Commit 3f66bf67 by 严立

LL - 发票邮寄信息修改

parent 7b7f1087
let output = { let output = {
// 测试环境 // 测试环境
base: 'http://bid-server.meiqicloud.com/', // 开发路径 // base: 'http://bid-server.meiqicloud.com/', // 开发路径
// base: '/Api/', // 部署路径 base: '/Api/', // 部署路径
resources: 'http://bid-web.meiqicloud.com', resources: 'http://bid-web.meiqicloud.com',
agentSignIn: 'http://bid-vue.meiqicloud.com/' agentSignIn: 'http://bid-vue.meiqicloud.com/'
......
<template> <template>
<!-- 通用组件 - 头部 --> <!-- 通用组件 - 头部 -->
<div class="components-currency-header row con-c align-c"> <div class="components-currency-header row con-c align-c">
<div class="global-maxwidth row con-b"> <div class="global-maxwidth row con-b">
<div class="about row align-c"> <div class="about row align-c">
<el-dropdown> <el-dropdown>
<span class="global-cursor">关注我们</span> <span class="global-cursor">关注我们</span>
<el-dropdown-menu class="about-code" slot="dropdown"> <el-dropdown-menu class="about-code" slot="dropdown">
<el-dropdown-item> <el-dropdown-item>
<img src="../assets/code.png" alt=""> <img src="../assets/code.png" alt="">
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<span class="global-cursor about-consulting" @click="$router.push('/question')">在线咨询</span> <span class="global-cursor about-consulting" @click="$router.push('/question')">在线咨询</span>
</div> </div>
<div class="row"> <div class="row">
<div class="search row"> <div class="search row">
<el-input v-model="searchKey" placeholder="搜索项目"><i class="el-icon-search"></i></el-input> <el-input v-model="searchKey" placeholder="搜索项目"><i class="el-icon-search"></i></el-input>
<el-button icon="el-icon-search" @click="onRedirectSearch()"></el-button> <el-button icon="el-icon-search" @click="onRedirectSearch()"></el-button>
</div> </div>
<div v-if="!isSignIn" class="not-sign-in row align-c"> <div v-if="!isSignIn" class="not-sign-in row align-c">
<span class="global-cursor" @click.prevent="onRegister()">注册</span> <span class="global-cursor" @click.prevent="onRegister()">注册</span>
<span class="global-cursor" @click.prevent="onSignIn()">登录</span> <span class="global-cursor" @click.prevent="onSignIn()">登录</span>
</div> </div>
<div v-if="isSignIn" class="sign-in row con-e align-c"> <div v-if="isSignIn" class="sign-in row con-e align-c">
<span class="global-cursor" @mouseenter="onMenuControl('enter')" @click="onMain()">{{info.name}}<i class="el-icon-caret-bottom"></i></span> <span class="global-cursor" @mouseenter="onMenuControl('enter')" @click="onMain()">{{info.name}}<i class="el-icon-caret-bottom"></i></span>
<!-- 专家还未初审 --> <!-- 专家还未初审 -->
<div v-if="winMenu && info.register !== 1 && info.identity === 1" class="menu-specialist" @mouseleave="onMenuControl('leave')"> <div v-if="winMenu && info.register !== 1 && info.identity === 1" class="menu-specialist" @mouseleave="onMenuControl('leave')">
<div class="menu-group row con-b"> <div class="menu-group row con-b">
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onSpecialist('info')">· 账号管理</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onSpecialist('info')">· 账号管理</span>
</div> </div>
<div class="global-cursor sign-out row con-c align-c"> <div class="global-cursor sign-out row con-c align-c">
<span @click="onSignOut()">退出登录</span> <span @click="onSignOut()">退出登录</span>
</div> </div>
</div> </div>
<!-- 专家通过初审 --> <!-- 专家通过初审 -->
<div v-if="winMenu && info.register === 1 && info.identity === 1" class="menu-specialist" @mouseleave="onMenuControl('leave')"> <div v-if="winMenu && info.register === 1 && info.identity === 1" class="menu-specialist" @mouseleave="onMenuControl('leave')">
<div class="menu-group row con-b"> <div class="menu-group row con-b">
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onSpecialist('bid')">· 我的评标</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onSpecialist('bid')">· 我的评标</span>
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onSpecialist('info')">· 账号管理</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onSpecialist('info')">· 账号管理</span>
</div> </div>
<div class="global-cursor sign-out row con-c align-c"> <div class="global-cursor sign-out row con-c align-c">
<span @click="onSignOut()">退出登录</span> <span @click="onSignOut()">退出登录</span>
</div> </div>
</div> </div>
<!-- 商家还未初审 --> <!-- 商家还未初审 -->
<div v-if="winMenu && info.register !== 1 && info.identity === 2" class="menu-supplier" @mouseleave="onMenuControl('leave')"> <div v-if="winMenu && info.register !== 1 && info.identity === 2" class="menu-supplier" @mouseleave="onMenuControl('leave')">
<div class="menu-group row con-b"> <div class="menu-group row con-b">
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('info')">· 账号管理</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('info')">· 账号管理</span>
</div> </div>
<div class="global-cursor sign-out row con-c align-c"> <div class="global-cursor sign-out row con-c align-c">
<span @click="onSignOut()">退出登录</span> <span @click="onSignOut()">退出登录</span>
</div> </div>
</div> </div>
<!-- 商家通过初审 --> <!-- 商家通过初审 -->
<div v-if="winMenu && info.register === 1 && info.identity === 2" class="menu-supplier" @mouseleave="onMenuControl('leave')"> <div v-if="winMenu && info.register === 1 && info.identity === 2" class="menu-supplier" @mouseleave="onMenuControl('leave')">
<div class="menu-group row con-b"> <div class="menu-group row con-b">
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('bid')">· 我的投标</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('bid')">· 我的投标</span>
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('auction')">· 我的竞价</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('auction')">· 我的竞价</span>
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('orders')">· 我的订单</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('orders')">· 我的订单</span>
<span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('info')">· 账号管理</span> <span class="global-cursor menu-item row con-c align-c" @click.prevent="onPersonal('info')">· 账号管理</span>
</div> </div>
<div class="global-cursor sign-out row con-c align-c"> <div class="global-cursor sign-out row con-c align-c">
<span @click="onSignOut()">退出登录</span> <span @click="onSignOut()">退出登录</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iToken from '@/common/js/token.js' import iToken from '@/common/js/token.js'
export default { export default {
data: function () { data: function () {
return { return {
searchKey: '', searchKey: '',
winMenu: false, winMenu: false,
} }
}, },
created: function () { created: function () {
this.init() this.init()
}, },
computed: { computed: {
info: function () { info: function () {
return this.$store.state.info return this.$store.state.info
}, },
isSignIn: function () { isSignIn: function () {
return this.$store.state.isSignIn return this.$store.state.isSignIn
}, },
}, },
watch: { watch: {
info: { info: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
isSignIn: { isSignIn: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
}, },
methods: { methods: {
/** /**
* 检查登录状态 * 检查登录状态
* @function * @function
* @returns * @returns
*/ */
init: function () { init: function () {
let funcToken = localStorage.getItem('token') let funcToken = localStorage.getItem('token')
if (!funcToken) { if (!funcToken) {
this.$store.commit('isSignIn', false) this.$store.commit('isSignIn', false)
this.$store.commit('info', null) this.$store.commit('info', null)
return return
} }
switch (iToken.state(funcToken)) { switch (iToken.state(funcToken)) {
case 'valid': case 'valid':
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', JSON.parse(localStorage.getItem('info'))) this.$store.commit('info', JSON.parse(localStorage.getItem('info')))
break break
case 'refresh': case 'refresh':
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', JSON.parse(localStorage.getItem('info'))) this.$store.commit('info', JSON.parse(localStorage.getItem('info')))
iRequest.request(iHost.base + 'bid/zLogin/refreshToken', { 'refreshToken': localStorage.getItem('refresh') }, 'json', 'get') iRequest.request(iHost.base + 'bid/zLogin/refreshToken', { 'refreshToken': localStorage.getItem('refresh') }, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
localStorage.setItem('token', funcResponse.token) localStorage.setItem('token', funcResponse.token)
localStorage.setItem('refresh', funcResponse.refreshToken) localStorage.setItem('refresh', funcResponse.refreshToken)
this.queryUserInfo() this.queryUserInfo()
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 'relist': case 'relist':
this.$message.error('登录失效请重新登录!') this.$message.error('登录失效请重新登录!')
this.onSignOut() this.onSignOut()
break break
default: default:
} }
}, },
queryUserInfo: function () { queryUserInfo: function () {
switch (this.info.identity) { switch (this.info.identity) {
case 1: case 1:
iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.name this.info.name = funcResponse.name
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('info', this.info) this.$store.commit('info', this.info)
localStorage.setItem('info', JSON.stringify(this.info)) localStorage.setItem('info', JSON.stringify(this.info))
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 2: case 2:
iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.companyName this.info.name = funcResponse.companyName
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('info', this.info) this.info.isJoinBid = Number(funcResponse.isJoinBid) === 0 ? false : true
localStorage.setItem('info', JSON.stringify(this.info)) this.$store.commit('info', this.info)
}) localStorage.setItem('info', JSON.stringify(this.info))
.catch((funcError) => { })
this.$message.error(funcError.message) .catch((funcError) => {
}) this.$message.error(funcError.message)
break })
} break
}
},
},
onSignIn: function () {
this.$router.push('/signIn') onSignIn: function () {
}, this.$router.push('/signIn')
},
onRegister: function () {
this.$router.push('/register') onRegister: function () {
}, this.$router.push('/register')
},
onRedirectSearch: function () {
if (!this.searchKey) { onRedirectSearch: function () {
this.$message.error('请输入搜索内容') if (!this.searchKey) {
return this.$message.error('请输入搜索内容')
} return
this.$router.push('/bid?search=' + this.searchKey) }
}, this.$router.push('/bid?search=' + this.searchKey)
},
onMenuControl: function (funcType) {
switch (funcType) { onMenuControl: function (funcType) {
case 'enter': switch (funcType) {
this.winMenu = true case 'enter':
break this.winMenu = true
break
case 'leave':
this.winMenu = false case 'leave':
break this.winMenu = false
} break
}, }
},
onSpecialist: function (funcType) {
console.log('onSpecialist', funcType) onSpecialist: function (funcType) {
switch (funcType) { console.log('onSpecialist', funcType)
case 'bid': switch (funcType) {
this.$router.push('/specialist') case 'bid':
break this.$router.push('/specialist')
break
case 'info':
this.$router.push('/specialist/info') case 'info':
break this.$router.push('/specialist/info')
} break
}, }
},
onPersonal: function (funcType) {
console.log('onPersonal', funcType) onPersonal: function (funcType) {
switch (funcType) { console.log('onPersonal', funcType)
case 'bid': switch (funcType) {
this.$router.push('/supplier/bidding') case 'bid':
break this.$router.push('/supplier/bidding')
break
case 'auction':
this.$router.push('/supplier/auction') case 'auction':
break this.$router.push('/supplier/auction')
break
case 'orders':
this.$router.push('/supplier/orders') case 'orders':
break this.$router.push('/supplier/orders')
break
case 'info':
this.$router.push('/supplier/info') case 'info':
break this.$router.push('/supplier/info')
} break
}, }
},
onSignOut: function () {
this.$store.commit('info', null) onSignOut: function () {
this.$store.commit('isSignIn', false) this.$store.commit('info', null)
this.$store.commit('redirectPath', null) this.$store.commit('isSignIn', false)
localStorage.clear() this.$store.commit('redirectPath', null)
}, localStorage.clear()
onMain: function () { },
// 审核未通过账号无法通过点击头像进入工作台 onMain: function () {
if (this.info.register !== 1) return // 审核未通过账号无法通过点击头像进入工作台
switch(this.info.identity) { if (this.info.register !== 1) return
case 1: switch(this.info.identity) {
this.$router.push('/specialist') case 1:
break this.$router.push('/specialist')
break
case 2:
this.$router.push('/supplier') case 2:
break this.$router.push('/supplier')
} break
}, }
} },
} }
</script> }
</script>
<style lang="less">
.components-currency-header { <style lang="less">
width: 100%; .components-currency-header {
height: 36px; width: 100%;
background: #F8F8F8; height: 36px;
background: #F8F8F8;
.about {
background: #F8F8F8; .about {
background: #F8F8F8;
.about-consulting {
margin-top: 1px; .about-consulting {
} margin-top: 1px;
}
span {
margin-right: 40px; span {
font-size: @fontSize00; margin-right: 40px;
color: @colorGrey60; font-size: @fontSize00;
} color: @colorGrey60;
} }
}
.about-code {
border: 1px red solid; .about-code {
} border: 1px red solid;
}
.search {
.el-input__inner { .search {
line-height: 1.4; .el-input__inner {
} line-height: 1.4;
margin-right: 15px; }
margin-right: 15px;
.el-input {
width: 170px; .el-input {
} width: 170px;
input { }
width: 170px; input {
height: 28px; width: 170px;
padding-right: 0; height: 28px;
border-radius: 14px 0 0 14px; padding-right: 0;
border-style: solid none solid solid; border-radius: 14px 0 0 14px;
} border-style: solid none solid solid;
}
button {
width: 38px; button {
height: 28px; width: 38px;
padding: 0; height: 28px;
border-radius: 0 14px 14px 0; padding: 0;
border-style: solid solid solid none; border-radius: 0 14px 14px 0;
} border-style: solid solid solid none;
} }
}
.not-sign-in {
span:nth-child(1) { .not-sign-in {
width: 42px; span:nth-child(1) {
border-right: 1px #acacac dashed; width: 42px;
font-size: @fontSize00; border-right: 1px #acacac dashed;
color: #333333; font-size: @fontSize00;
} color: #333333;
}
span:nth-child(2) {
width: 52px; span:nth-child(2) {
padding-left: 14px; width: 52px;
font-size: @fontSize00; padding-left: 14px;
color: #333333; font-size: @fontSize00;
} color: #333333;
} }
}
.sign-in {
z-index: 9; .sign-in {
position: relative; z-index: 9;
position: relative;
> span {
white-space: nowrap; > span {
color: @colorGrey20; white-space: nowrap;
font-size: @fontSize00; color: @colorGrey20;
} font-size: @fontSize00;
}
.menu-specialist {
z-index: 7; .menu-specialist {
position: absolute; z-index: 7;
top: 30px; position: absolute;
width: 190px; top: 30px;
height: 120px; width: 190px;
background: #FFFFFF; height: 120px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15); background: #FFFFFF;
} box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}
.menu-supplier {
z-index: 7; .menu-supplier {
position: absolute; z-index: 7;
top: 30px; position: absolute;
width: 190px; top: 30px;
min-height: 80px; width: 190px;
background: #FFFFFF; min-height: 80px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15); background: #FFFFFF;
} box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}
.menu-group {
display: flex; .menu-group {
flex-wrap: wrap; display: flex;
padding: 16px 20px; flex-wrap: wrap;
border-bottom: 1px @colorGrey80 dashed; padding: 16px 20px;
border-bottom: 1px @colorGrey80 dashed;
.menu-item {
height: 36px; .menu-item {
font-size: @fontSize01; height: 36px;
} font-size: @fontSize01;
} }
}
.sign-out {
height: 54px; .sign-out {
font-size: @fontSize01; height: 54px;
} font-size: @fontSize01;
} }
} }
</style> }
</style>
<template> <template>
<!-- 下载模板 - 附件下载 --> <!-- 下载模板 - 附件下载 -->
<div v-if="componentFile.length > 0" class="components-file"> <div v-if="componentFile.length > 0" class="components-file">
<div class="row align-c"> <div class="row align-c">
<span>文件预览</span> <span>文件预览</span>
</div> </div>
<div class="col"> <div class="col">
<div class="list row align-c" v-for="(item, index) in componentFile" :key="index" @click="onDownload(item)"> <div class="list row align-c" v-for="(item, index) in componentFile" :key="index" @click="onDownload(item)">
<img src="../assets/notice-file.png" alt=""> <img src="../assets/notice-file.png" alt="">
<div class="row align-c">{{item.name}}</div> <div class="row align-c">{{item.name}}</div>
<div class="row align-c">预览</div> <div class="row align-c">预览</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
export default { export default {
data () { data () {
return { return {
file: '' file: ''
} }
}, },
computed: { computed: {
componentFile: function () { componentFile: function () {
return this.$store.state.componentFile return this.$store.state.componentFile
}, },
}, },
watch: { watch: {
componentFile: { componentFile: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
} }
}, },
methods: { methods: {
onDownload: function (funcItem) { onDownload: function (funcItem) {
// 下载文档 console.log('onDownload')
// window.open(iHost.base + funcItem.url) // 未登录的全部跳转登录界面
if (!this.$store.getters.isSignIn) {
// 预览组件 this.$message.error('请先登录后查看')
let routeData = this.$router.resolve({ path:'/file?file=' + encodeURIComponent(funcItem.url) }) this.$store.commit('redirectPath', this.$route.fullPath)
window.open(routeData.href, '_blank') this.$router.push('/signIn')
} return
} }
}
</script> console.log('this.$store.getters.info', this.$store.getters.info)
<style lang="less"> if (this.$store.getters.info.register !== 1) {
.components-file { this.$message.error('注册信息审核通过才可以进行预览')
width: 100%; return
padding-bottom: 20px; }
background: #F2F2F2;
> div:nth-child(1) { // 下载文档
height: 60px; // window.open(iHost.base + funcItem.url)
padding: 0 24px;
border-bottom: 1px #E5E5E5 solid; // 预览组件
font-size: @fontSize04; let routeData = this.$router.resolve({ path:'/file?file=' + encodeURIComponent(funcItem.url) })
} window.open(routeData.href, '_blank')
}
> div:nth-child(2) { }
padding: 0 24px; }
</script>
.list {
width: 100%; <style lang="less">
margin-top: 20px; .components-file {
font-size: @fontSize01; width: 100%;
cursor: pointer; padding-bottom: 20px;
background: #F2F2F2;
div:nth-child(2) {
flex-grow: 1; > div:nth-child(1) {
padding-left: 4px; height: 60px;
text-decoration: underline; padding: 0 24px;
cursor: pointer; border-bottom: 1px #E5E5E5 solid;
} font-size: @fontSize04;
}
div:nth-child(3) {
cursor: pointer; > div:nth-child(2) {
} padding: 0 24px;
}
} .list {
} width: 100%;
</style> margin-top: 20px;
font-size: @fontSize01;
cursor: pointer;
div:nth-child(2) {
flex-grow: 1;
padding-left: 4px;
text-decoration: underline;
cursor: pointer;
}
div:nth-child(3) {
cursor: pointer;
}
}
}
}
</style>
...@@ -74,13 +74,13 @@ ...@@ -74,13 +74,13 @@
<div class="col con-c align-c"> <div class="col con-c align-c">
<img v-if="componentProject.noticeType === 0" class="operate-img" src="../assets/notice-bitton.png" alt=""> <img v-if="componentProject.noticeType === 0" class="operate-img" src="../assets/notice-bitton.png" alt="">
<div v-if="operateText !== ''" class="operate-button"> <div v-if="operateText !== ''" class="operate-button">
<button v-if="[2].indexOf(componentProgress.state) >= 0" class="global-enable" @click="onOffer()">立即报价</button> <button v-if="[0, 2].indexOf(componentProgress.state) >= 0" class="global-enable" @click="onOffer()">立即报价</button>
<button v-if="[3, 4].indexOf(componentProgress.state) >= 0" class="global-disable" disabled>报价已结束</button> <button v-if="[3, 4].indexOf(componentProgress.state) >= 0" class="global-disable" disabled>报价已结束</button>
<button v-if="[5].indexOf(componentProgress.state) >= 0" class="global-disable" disabled>报价已暂停</button> <button v-if="[5].indexOf(componentProgress.state) >= 0" class="global-disable" disabled>报价已暂停</button>
<button v-if="[6].indexOf(componentProgress.state) >= 0" class="global-disable" disabled>报价已终止</button> <button v-if="[6].indexOf(componentProgress.state) >= 0" class="global-disable" disabled>报价已终止</button>
</div> </div>
<div class="operate-tip"> <div class="operate-tip">
<span v-if="progressState === 1">距离报价开始仅剩 <span class="global-color-red">{{operateDay}}</span><span class="global-color-red">{{operateHour}}</span> 小时</span> <span v-if="progressState === 1 && !([5, 6].indexOf(componentProgress.state) >= 0)">距离报价开始仅剩 <span class="global-color-red">{{operateDay}}</span><span class="global-color-red">{{operateHour}}</span> 小时</span>
<span v-if="[2].indexOf(componentProgress.state) >= 0 && !operateIsBuy">报价仅剩 <span class="global-color-red">{{operateDay}}</span><span class="global-color-red">{{operateHour}}</span> 小时</span> <span v-if="[2].indexOf(componentProgress.state) >= 0 && !operateIsBuy">报价仅剩 <span class="global-color-red">{{operateDay}}</span><span class="global-color-red">{{operateHour}}</span> 小时</span>
</div> </div>
</div> </div>
......
...@@ -345,10 +345,10 @@ ...@@ -345,10 +345,10 @@
<span>联系电话:</span> <span>联系电话:</span>
<span>{{componentProject.buyPhone}}</span> <span>{{componentProject.buyPhone}}</span>
</div> </div>
<div class="item-text row align-c"> <!-- <div class="item-text row align-c">
<span>竞价时间:</span> <span>竞价时间:</span>
<span>{{componentProject.timeBegin + ' - ' + componentProject.timeEnd}}</span> <span>{{componentProject.timeBegin + ' - ' + componentProject.timeEnd}}</span>
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
......
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
// 解决跳转重复路径报错问题 // 解决跳转重复路径报错问题
let funcRouterPush = Router.prototype.push let funcRouterPush = Router.prototype.push
Router.prototype.push = function push(funcPath) { Router.prototype.push = function push(funcPath) {
return funcRouterPush.call(this, funcPath).catch(funcError => funcError) return funcRouterPush.call(this, funcPath).catch(funcError => funcError)
} }
Vue.use(Router) Vue.use(Router)
export default new Router({ export default new Router({
mode : 'history', mode : 'history',
routes: [ routes: [
{ path: '/', name: 'home', mapText: '首页', component: () => import('@/view/home.vue') }, { path: '/', name: 'home', mapText: '首页', component: () => import('@/view/home.vue') },
{ path: '/signIn', component: () => import('@/view/sign-in.vue'), { path: '/signIn', component: () => import('@/view/sign-in.vue'),
children: [ children: [
{ path: '/', name: 'signInStatus', mapText: '登录身份', component: () => import('@/view/sign-in-status.vue') }, { path: '/', name: 'signInStatus', mapText: '登录身份', component: () => import('@/view/sign-in-status.vue') },
{ path: 'input', name: 'signInInput', mapText: '登录', component: () => import('@/view/sign-in-input.vue') }, { path: 'input', name: 'signInInput', mapText: '登录', component: () => import('@/view/sign-in-input.vue') },
{ path: 'forget', name: 'signInForget', mapText: '忘记密码', component: () => import('@/view/sign-in-forget.vue') }, { path: 'forget', name: 'signInForget', mapText: '忘记密码', component: () => import('@/view/sign-in-forget.vue') },
] ]
}, },
{ path: '/register', component: () => import('@/view/register.vue'), { path: '/register', component: () => import('@/view/register.vue'),
children: [ children: [
{ path: '/', name: 'registerStatus', mapText: '注册身份', component: () => import('@/view/register-status.vue') }, { path: '/', name: 'registerStatus', mapText: '注册身份', component: () => import('@/view/register-status.vue') },
{ path: 'supplier', name: 'registerSupplier', mapText: '供应商注册', component: () => import('@/view/register-supplier.vue') }, { path: 'supplier', name: 'registerSupplier', mapText: '供应商注册', component: () => import('@/view/register-supplier.vue') },
{ path: 'specialist', name: 'registerSpecialist', mapText: '专家注册', component: () => import('@/view/register-specialist.vue') }, { path: 'specialist', name: 'registerSpecialist', mapText: '专家注册', component: () => import('@/view/register-specialist.vue') },
] ]
}, },
{ path: '/bid', component: () => import('@/view/public/bid.vue'), { path: '/bid', component: () => import('@/view/public/bid.vue'),
children: [ children: [
{ path: '/', name: 'bidList', mapText: '招标公告', component: () => import('@/view/public/bid-list.vue') }, { path: '/', name: 'bidList', mapText: '招标公告', component: () => import('@/view/public/bid-list.vue') },
{ path: 'notice', name: 'bidNotice', mapText: '公告详情', component: () => import('@/view/public/bid-notice.vue') }, { path: 'notice', name: 'bidNotice', mapText: '公告详情', component: () => import('@/view/public/bid-notice.vue') },
{ path: 'buy', name: 'buy', mapText: '订单确认', component: () => import('@/view/public/bid-buy.vue') }, { path: 'buy', name: 'buy', mapText: '订单确认', component: () => import('@/view/public/bid-buy.vue') },
{ path: 'buyresult', name: 'buyResult', mapText: '完成报名', component: () => import('@/view/public/bid-buy-result.vue') }, { path: 'buyresult', name: 'buyResult', mapText: '完成报名', component: () => import('@/view/public/bid-buy-result.vue') },
] ]
}, },
{ path: '/policy', component: () => import('@/view/public/policy.vue'), { path: '/policy', component: () => import('@/view/public/policy.vue'),
children: [ children: [
{ path: '/', name: 'policyList', mapText: '政策法规', component: () => import('@/view/public/policy-list.vue') }, { path: '/', name: 'policyList', mapText: '政策法规', component: () => import('@/view/public/policy-list.vue') },
{ path: 'details', name: 'policyDetails', mapText: '政策法规详情', component: () => import('@/view/public/policy-details.vue') }, { path: 'details', name: 'policyDetails', mapText: '政策法规详情', component: () => import('@/view/public/policy-details.vue') },
] ]
}, },
{ path: '/trends', component: () => import('@/view/public/trends.vue'), { path: '/trends', component: () => import('@/view/public/trends.vue'),
children: [ children: [
{ path: '/', name: 'trendsList', mapText: '招标动态', component: () => import('@/view/public/trends-list.vue') }, { path: '/', name: 'trendsList', mapText: '招标动态', component: () => import('@/view/public/trends-list.vue') },
{ path: 'details', name: 'trendsDetails', mapText: '招标动态详情', component: () => import('@/view/public/trends-details.vue') }, { path: 'details', name: 'trendsDetails', mapText: '招标动态详情', component: () => import('@/view/public/trends-details.vue') },
] ]
}, },
{ path: '/question', component: () => import('@/view/public/question.vue'), { path: '/question', component: () => import('@/view/public/question.vue'),
children: [ children: [
{ path: '/', name: 'question', mapText: '在线咨询', component: () => import('@/view/public/question-list.vue') }, { path: '/', name: 'question', mapText: '在线咨询', component: () => import('@/view/public/question-list.vue') },
{ path: 'input', name: 'questionInput', mapText: '填写咨询', component: () => import('@/view/public/question-input.vue') }, { path: 'input', name: 'questionInput', mapText: '填写咨询', component: () => import('@/view/public/question-input.vue') },
{ path: 'detail', name: 'questionDetail', mapText: '咨询详情', component: () => import('@/view/public/question-detail.vue') }, { path: 'detail', name: 'questionDetail', mapText: '咨询详情', component: () => import('@/view/public/question-detail.vue') },
] ]
}, },
{ path: '/help', component: () => import('@/view/public/help.vue'), { path: '/help', component: () => import('@/view/public/help.vue'),
children: [ children: [
{ path: '/', name: 'help', mapText: '帮助中心', component: () => import('@/view/public/help-list.vue') }, { path: '/', name: 'help', mapText: '帮助中心', component: () => import('@/view/public/help-list.vue') },
] ]
}, },
// { path: '/about', name: 'about', mapText: '关于我们', component: () => import('@/view/about.vue') }, // { path: '/about', name: 'about', mapText: '关于我们', component: () => import('@/view/about.vue') },
{ path: '/file', name: 'file', mapText: '预览', component: () => import('@/view/pdf.vue') }, { path: '/file', name: 'file', mapText: '预览', component: () => import('@/view/pdf.vue') },
// 用户中心 - 商家 // 用户中心 - 商家
{ path: '/supplier', component: () => import('@/view/personal/supplier.vue'), { path: '/supplier', component: () => import('@/view/personal/supplier.vue'),
children: [ children: [
{ path: '/', name: 'supplier', mapText: '工作台首页', component: () => import('@/view/personal/supplier-home.vue') }, { path: '/', name: 'supplier', mapText: '工作台首页', component: () => import('@/view/personal/supplier-home.vue') },
{ path: 'bidding', name: 'supplierBid', mapText: '我的投标项目', component: () => import('@/view/personal/supplier-biding.vue') }, { path: 'bidding', name: 'supplierBid', mapText: '我的投标项目', component: () => import('@/view/personal/supplier-biding.vue') },
{ path: 'auction', name: 'supplierAuction', mapText: '我的竞价项目', component: () => import('@/view/personal/supplier-auction.vue') }, { path: 'auction', name: 'supplierAuction', mapText: '我的竞价项目', component: () => import('@/view/personal/supplier-auction.vue') },
{ path: 'detail', name: 'supplierDetail', mapText: '详情', component: () => import('@/view/personal/supplier-notice.vue') }, { path: 'detail', name: 'supplierDetail', mapText: '详情', component: () => import('@/view/personal/supplier-notice.vue') },
{ path: 'orders', name: 'supplierOrders', mapText: '我的订单', component: () => import('@/view/personal/supplier-orders.vue') }, { path: 'orders', name: 'supplierOrders', mapText: '我的订单', component: () => import('@/view/personal/supplier-orders.vue') },
{ path: 'ordersdetail', name: 'supplierOrdersDetail', mapText: '订单详情', component: () => import('@/view/personal/supplier-orders-detail.vue') }, { path: 'ordersdetail', name: 'supplierOrdersDetail', mapText: '订单详情', component: () => import('@/view/personal/supplier-orders-detail.vue') },
{ path: 'ordersbills', name: 'supplierOrdersBills', mapText: '申请开票', component: () => import('@/view/personal/supplier-orders-bills.vue') }, { path: 'ordersbills', name: 'supplierOrdersBills', mapText: '申请开票', component: () => import('@/view/personal/supplier-orders-bills.vue') },
{ path: 'info', name: 'supplierInfo', mapText: '企业信息', component: () => import('@/view/personal/supplier-info.vue') }, { path: 'info', name: 'supplierInfo', mapText: '企业信息', component: () => import('@/view/personal/supplier-info.vue') },
{ path: 'infochange', name: 'supplierInfoChange', mapText: '修改企业信息', component: () => import('@/view/personal/supplier-info-change.vue') }, { path: 'infochange', name: 'supplierInfoChange', mapText: '修改企业信息', component: () => import('@/view/personal/supplier-info-change.vue') },
{ path: 'inforecord', name: 'supplierInfoRecord', mapText: '审核记录', component: () => import('@/view/personal/supplier-info-record.vue') }, { path: 'inforecord', name: 'supplierInfoRecord', mapText: '审核记录', component: () => import('@/view/personal/supplier-info-record.vue') },
{ path: 'infophone', name: 'supplierInfoPhone', mapText: '更换手机号码', component: () => import('@/view/personal/supplier-info-phone.vue') }, { path: 'infophone', name: 'supplierInfoPhone', mapText: '更换手机号码', component: () => import('@/view/personal/supplier-info-phone.vue') },
{ path: 'infopassword', name: 'supplierInfoPassword', mapText: '修改登录密码', component: () => import('@/view/personal/supplier-info-password.vue') }, { path: 'infopassword', name: 'supplierInfoPassword', mapText: '修改登录密码', component: () => import('@/view/personal/supplier-info-password.vue') },
{ path: 'notify', name: 'supplierNotify', mapText: '我的通知', component: () => import('@/view/personal/supplier-notify.vue') }, { path: 'notify', name: 'supplierNotify', mapText: '我的通知', component: () => import('@/view/personal/supplier-notify.vue') },
] ]
}, },
// 用户中心 - 专家 // 用户中心 - 专家
{ path: '/specialist', component: () => import('@/view/specialist/specialist.vue'), { path: '/specialist', component: () => import('@/view/specialist/specialist.vue'),
children: [ children: [
{ path: '/', name: 'specialist', mapText: '我评标的项目', component: () => import('@/view/specialist/specialist-home.vue') }, { path: '/', name: 'specialist', mapText: '我评标的项目', component: () => import('@/view/specialist/specialist-home.vue') },
{ path: 'info', name: 'specialistInfo', mapText: '我的信息', component: () => import('@/view/specialist/specialist-info.vue') }, { path: 'info', name: 'specialistInfo', mapText: '我的信息', component: () => import('@/view/specialist/specialist-info.vue') },
{ path: 'infochange', name: 'specialistInfoChange', mapText: '修改我的信息', component: () => import('@/view/specialist/specialist-info-change.vue') }, { path: 'infochange', name: 'specialistInfoChange', mapText: '修改我的信息', component: () => import('@/view/specialist/specialist-info-change.vue') },
{ path: 'inforecord', name: 'specialistInfoRecord', mapText: '审核记录', component: () => import('@/view/specialist/specialist-info-record.vue') }, { path: 'inforecord', name: 'specialistInfoRecord', mapText: '审核记录', component: () => import('@/view/specialist/specialist-info-record.vue') },
{ path: 'infophone', name: 'specialistInfoPhone', mapText: '更换手机号码', component: () => import('@/view/specialist/specialist-info-phone.vue') }, { path: 'infophone', name: 'specialistInfoPhone', mapText: '更换手机号码', component: () => import('@/view/specialist/specialist-info-phone.vue') },
{ path: 'infopassword', name: 'specialistInfoPassword', mapText: '修改登录密码', component: () => import('@/view/specialist/specialist-info-password.vue') }, { path: 'infopassword', name: 'specialistInfoPassword', mapText: '修改登录密码', component: () => import('@/view/specialist/specialist-info-password.vue') },
{ path: 'notify', name: 'specialistNotify', mapText: '我的通知', component: () => import('@/view/specialist/specialist-notify.vue') }, { path: 'notify', name: 'specialistNotify', mapText: '我的通知', component: () => import('@/view/specialist/specialist-notify.vue') },
] ]
}, },
{ path: '*', name: '404', meta: { title: '404' }, component: () => import('@/view/404.vue')} { path: '*', name: '404', meta: { title: '404' }, component: () => import('@/view/404.vue')}
], ],
scrollBehavior(to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
return { return {
x: 0, x: 0,
y: 0, y: 0,
} }
} }
}) })
\ No newline at end of file
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
<!-- 今日开标 --> <!-- 今日开标 -->
<div class="new-bid row con-c"> <div class="new-bid row con-c">
<div class="global-maxwidth row con-b"> <div class="global-maxwidth row con-b">
<!--
下次更新内容,暂时隐藏。
<div class="calendar"> <div class="calendar">
<span class="calendar-title">开标日历</span> <span class="calendar-title">开标日历</span>
<calendar :markDate="['2020/10/13','2020/10/14']"></calendar> <calendar :markDate="calendarMarkDate"></calendar>
</div> </div>
<div> <div>
<div class="row align-e"> <div class="row align-e">
...@@ -37,6 +39,24 @@ ...@@ -37,6 +39,24 @@
<span>今日暂无开标项目</span> <span>今日暂无开标项目</span>
</div> </div>
</div> </div>
-->
<div>
<div class="row align-e">
<span class="title">今日开标</span>
<span class="title-extra global-color-red">{{timeDate + '开标项目'}}</span>
</div>
<div v-if="listBid.length" class="list col">
<div class="global-hover row con-b align-e" v-for="(item, index) in listBid" :key="index" @click="onDetail(item)">
<span class="global-cursor global-overflow-ellipsis ">{{item.noticeTitle}}</span>
<span>{{item.timeRelease}}</span>
</div>
</div>
<div v-if="!listBid.length" class="nothing col con-c align-c">
<img src="../assets/nothing.png" alt="">
<span>今日暂无开标项目</span>
</div>
</div>
<!-- 未登录状态展示 --> <!-- 未登录状态展示 -->
<div v-if="!isSignIn" class="home-signin col"> <div v-if="!isSignIn" class="home-signin col">
<div class="home-signin-entry row"> <div class="home-signin-entry row">
...@@ -264,6 +284,8 @@ ...@@ -264,6 +284,8 @@
dealIndex: 0, // 最新交易缓存数组索引 dealIndex: 0, // 最新交易缓存数组索引
dealActive: 0, // 最新交易选中 dealActive: 0, // 最新交易选中
dealMax: 0, // 最新交易数据条目 dealMax: 0, // 最新交易数据条目
calendarMarkDate: [],
} }
}, },
computed: { computed: {
...@@ -297,7 +319,9 @@ ...@@ -297,7 +319,9 @@
this.queryNotice(2, 0) this.queryNotice(2, 0)
this.onQueryAuction(0) this.onQueryAuction(0)
this.queryData() this.queryData()
this.queryBidMark()
}, },
methods: { methods: {
queryNotify: function () { queryNotify: function () {
if (this.info.identity) { if (this.info.identity) {
...@@ -355,6 +379,42 @@ ...@@ -355,6 +379,42 @@
console.log(funcError) console.log(funcError)
}) })
}, },
queryBidMark: function () {
let funcResponse = [{
date: '2020-10-13',
quantity: 8,
}, {
date: '2020-10-15',
quantity: 9,
}, {
date: '2020-10-18',
quantity: 12,
}, {
date: '2020-10-21',
quantity: 14,
}]
let funcMarkDate = []
let funcMarkQuantity = []
let funcMarkQuantityCss = ''
for (let i = 0, l = funcResponse.length; i < l; i++) {
funcMarkDate.push(iMiment(funcResponse[i].date).format('YYYY/MM/DD'))
funcMarkQuantity.push(funcResponse[i].quantity)
}
this.calendarMarkDate = funcMarkDate
this.$nextTick(function () {
let funcMark = document.getElementsByClassName('wh_isMark')
console.log(funcMark)
for (let i = 0, l = funcMark.length; i < l; i++) {
funcMark[i].setAttribute( 'data-content' , funcMarkQuantity[i] )
}
})
},
setHome: function () { setHome: function () {
this.setBid() this.setBid()
this.setNew() this.setNew()
...@@ -499,9 +559,7 @@ ...@@ -499,9 +559,7 @@
*/ */
onMoreNotice: function () { onMoreNotice: function () {
let funcNoticeIndex = this.noticeTab[this.noticeTabActive].value let funcNoticeIndex = this.noticeTab[this.noticeTabActive].value
console.log(funcNoticeIndex) let funcNoticeUrl = this.$router.push({ path: '/bid', query: { type: funcNoticeIndex } })
let funcNoticeUrl = this.$router.resolve({ path: '/bid', query: { type: funcNoticeIndex } })
window.open(funcNoticeUrl .href, '_blank')
}, },
/** /**
* 公告点击跳转详情 * 公告点击跳转详情
...@@ -715,12 +773,16 @@ ...@@ -715,12 +773,16 @@
.wh_isMark::after { .wh_isMark::after {
position: absolute; position: absolute;
bottom: 4px; right: 0;
content: ''; bottom: 0;
width: 10px; content: attr(data-content);
height: 10px; width: 20px;
border-radius: 50%; height: 16px;
background: #D02F1E; background: #D02F1E;
font-size: 12px;
line-height: 20px;
} }
.wh_isToday { .wh_isToday {
...@@ -756,7 +818,8 @@ ...@@ -756,7 +818,8 @@
padding-bottom: 4px; padding-bottom: 4px;
} }
.list { .list {
width: 750px; width: 940px;
// width: 750px;
span:nth-child(1) { span:nth-child(1) {
max-width: 830px; max-width: 830px;
margin-top: 32px; margin-top: 32px;
...@@ -768,7 +831,8 @@ ...@@ -768,7 +831,8 @@
} }
} }
.nothing { .nothing {
width: 750px; width: 940px;
// width: 750px;
height: 200px; height: 200px;
img { img {
height: 100px; height: 100px;
...@@ -776,9 +840,9 @@ ...@@ -776,9 +840,9 @@
} }
} }
.home-signin { .home-signin {
position: absolute; // position: absolute;
top: 60px; // top: 60px;
right: 0; // right: 0;
width: 206px; width: 206px;
height: 300px; height: 300px;
padding: 24px 0; padding: 24px 0;
......
<template> <template>
<!-- 通用组件 - 头部 --> <!-- 通用组件 - 头部 -->
<div class="components-personal-header row con-b align-c" @mouseleave="onMenuControl('leave')"> <div class="components-personal-header row con-b align-c" @mouseleave="onMenuControl('leave')">
<div class="title"> <div class="title">
<span>我的工作台</span> <span>我的工作台</span>
</div> </div>
<div class="personal row align-c"> <div class="personal row align-c">
<img class="global-cursor" src="../../../assets/currency-map.png" alt="" @click="$router.push('/')"> <img class="global-cursor" src="../../../assets/currency-map.png" alt="" @click="$router.push('/')">
<el-badge :is-dot="isNewNotice" class="row align-c"> <el-badge :is-dot="isNewNotice" class="row align-c">
<img class="global-cursor" src="../../../assets/notice-tip.png" alt="" @click="$router.push('/supplier/notify')"> <img class="global-cursor" src="../../../assets/notice-tip.png" alt="" @click="$router.push('/supplier/notify')">
</el-badge> </el-badge>
<span>{{info ? info.name : ''}}</span> <span>{{info ? info.name : ''}}</span>
<span class="global-cursor" @click="onSignOut()">退出</span> <span class="global-cursor" @click="onSignOut()">退出</span>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iToken from '@/common/js/token.js' import iToken from '@/common/js/token.js'
export default { export default {
data: function () { data: function () {
return { return {
isNewNotice: false, isNewNotice: false,
winMenu: false, winMenu: false,
} }
}, },
computed: { computed: {
info: function () { info: function () {
return this.$store.state.info return this.$store.state.info
}, },
notify: function () { notify: function () {
return this.$store.state.notify return this.$store.state.notify
}, },
}, },
watch: { watch: {
info: { info: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
notify: { notify: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
this.queryNotice() this.queryNotice()
}, },
deep: true, deep: true,
immediate: true, immediate: true,
} }
}, },
created: function () { created: function () {
this.init() this.init()
this.queryNotice() this.queryNotice()
}, },
methods: { methods: {
/** /**
* 检查登录状态 * 检查登录状态
* @function * @function
* @returns * @returns
*/ */
init: function () { init: function () {
let funcToken = localStorage.getItem('token') let funcToken = localStorage.getItem('token')
console.log('funcToken - 2', funcToken) console.log('funcToken - 2', funcToken)
if (!funcToken) { if (!funcToken) {
this.$router.push('/signIn') this.$router.push('/signIn')
return return
} }
switch (iToken.state(funcToken)) { switch (iToken.state(funcToken)) {
case 'valid': case 'valid':
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', JSON.parse(localStorage.getItem('info'))) this.$store.commit('info', JSON.parse(localStorage.getItem('info')))
break break
case 'refresh': case 'refresh':
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', JSON.parse(localStorage.getItem('info'))) this.$store.commit('info', JSON.parse(localStorage.getItem('info')))
iRequest.request(iHost.base + 'bid/zLogin/refreshToken', { 'refreshToken': localStorage.getItem('refresh') }, 'json', 'get') iRequest.request(iHost.base + 'bid/zLogin/refreshToken', { 'refreshToken': localStorage.getItem('refresh') }, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
localStorage.setItem('token', funcResponse.token) localStorage.setItem('token', funcResponse.token)
localStorage.setItem('refresh', funcResponse.refreshToken) localStorage.setItem('refresh', funcResponse.refreshToken)
this.queryUserInfo() this.queryUserInfo()
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 'relist': case 'relist':
this.onSignOut() this.onSignOut()
break break
} }
}, },
queryNotice: function () { queryNotice: function () {
iRequest.request(iHost.base + 'bid/zNotification/countUnread', { 'userType': 2 }, 'json', 'post') iRequest.request(iHost.base + 'bid/zNotification/countUnread', { 'userType': 2 }, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
if (funcResponse.count > 0) { if (funcResponse.count > 0) {
this.isNewNotice = true this.isNewNotice = true
} else { } else {
this.isNewNotice = false this.isNewNotice = false
} }
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
}, },
queryUserInfo: function () { queryUserInfo: function () {
switch (this.info.identity) { switch (this.info.identity) {
case 1: case 1:
iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.name this.info.name = funcResponse.name
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('info', this.info) this.$store.commit('info', this.info)
localStorage.setItem('info', JSON.stringify(this.info)) localStorage.setItem('info', JSON.stringify(this.info))
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 2: case 2:
iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.companyName this.info.name = funcResponse.companyName
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('info', this.info) this.info.isJoinBid = Number(funcResponse.isJoinBid) === 0 ? false : true
localStorage.setItem('info', JSON.stringify(this.info)) this.$store.commit('info', this.info)
}) localStorage.setItem('info', JSON.stringify(this.info))
.catch((funcError) => { })
this.$message.error(funcError.message) .catch((funcError) => {
}) this.$message.error(funcError.message)
break })
} break
}, }
},
onMenuControl: function (funcType) {
switch (funcType) { onMenuControl: function (funcType) {
case 'enter': switch (funcType) {
this.winMenu = true case 'enter':
break this.winMenu = true
break
case 'leave':
this.winMenu = false case 'leave':
break this.winMenu = false
} break
}, }
},
onSignOut: function () {
this.$router.push('/') onSignOut: function () {
this.$store.commit('info', null) this.$router.push('/')
this.$store.commit('isSignIn', false) this.$store.commit('info', null)
this.$store.commit('redirectPath', null) this.$store.commit('isSignIn', false)
localStorage.clear() this.$store.commit('redirectPath', null)
} localStorage.clear()
} }
} }
</script> }
</script>
<style lang="less">
.components-personal-header { <style lang="less">
width: 100%; .components-personal-header {
height: 60px; width: 100%;
padding: 0 40px; height: 60px;
background-image: url(../../../assets/bg-title.png); padding: 0 40px;
background-repeat: no-repeat; background-image: url(../../../assets/bg-title.png);
background-repeat: no-repeat;
.title {
color: #FFFFFF; .title {
} color: #FFFFFF;
}
.personal {
position: relative; .personal {
height: 100%; position: relative;
color: #FFFFFF; height: 100%;
color: #FFFFFF;
span {
margin-left: 20px; span {
} margin-left: 20px;
}
img {
width: 16px; img {
height: 16px; width: 16px;
margin-left: 12px; height: 16px;
} margin-left: 12px;
} }
} }
</style> }
</style>
<template> <template>
<!-- 账号管理 - 企业信息 - 修改信息 --> <!-- 账号管理 - 企业信息 - 修改信息 -->
<div class="supplier-info"> <div class="supplier-info">
<!-- 页面地图 --> <!-- 页面地图 -->
<div class="supplier-map row align-c"> <div class="supplier-map row align-c">
<currencyMap :customPath="[{ text: '企业信息', redirect: '/supplier/info' }, { text: '修改企业信息', redirect: null }]"></currencyMap> <currencyMap :customPath="[{ text: '企业信息', redirect: '/supplier/info' }, { text: '修改企业信息', redirect: null }]"></currencyMap>
</div> </div>
<div class="supplier-set col"> <div class="supplier-set col">
<div class="detail-title row align-c"> <div class="detail-title row align-c">
<span>基本信息</span> <span>基本信息</span>
</div> </div>
<div class="detail-content"> <div class="detail-content">
<el-form ref="formBase" :model="formRegister" :rules="rule" label-width="160px"> <el-form ref="formBase" :model="formRegister" :rules="rule" label-width="160px">
<el-form-item label="公司名称:" prop="companyName"> <el-form-item label="公司名称:" prop="companyName">
<el-input v-model="formRegister.companyName" maxlength="60" placeholder="请输入公司名称"></el-input> <el-input v-model="formRegister.companyName" maxlength="60" placeholder="请输入公司名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="公司简称:" prop="companyShortName"> <el-form-item label="公司简称:" prop="companyShortName">
<el-input v-model="formRegister.companyShortName" maxlength="6" placeholder="请输入公司简称"></el-input> <el-input v-model="formRegister.companyShortName" maxlength="6" placeholder="请输入公司简称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="统一社会信用代码:" prop="companyCode"> <el-form-item label="统一社会信用代码:" prop="companyCode">
<el-input v-if="info.register !== 1" v-model="formRegister.companyCode" maxlength="18" placeholder="请输入统一社会信用代码"></el-input> <el-input v-if="info.register !== 1" v-model="formRegister.companyCode" maxlength="18" placeholder="请输入统一社会信用代码"></el-input>
<span v-if="info.register === 1">{{formRegister.companyCode}}</span> <span v-if="info.register === 1">{{formRegister.companyCode}}</span>
</el-form-item> </el-form-item>
<el-form-item label="登记地址:" prop="companyAddress"> <el-form-item label="登记地址:" prop="companyAddress">
<el-input v-model="formRegister.companyAddress" maxlength="100" placeholder="请输入登记地址"></el-input> <el-input v-model="formRegister.companyAddress" maxlength="100" placeholder="请输入登记地址"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="机构邮箱:" prop="email"> <el-form-item label="机构邮箱:" prop="email">
<el-input v-model="formRegister.email" maxlength="50" placeholder="请输入机构邮箱"></el-input> <el-input v-model="formRegister.email" maxlength="50" placeholder="请输入机构邮箱"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="register-info-certificate" label="上传营业执照:" prop="licenseImage"> <el-form-item class="register-info-certificate" label="上传营业执照:" prop="licenseImage">
<!-- 此处 input 是为了模拟校验而设置的隐藏组件 --> <!-- 此处 input 是为了模拟校验而设置的隐藏组件 -->
<el-input class="global-none" v-model="formRegister.licenseImage"></el-input> <el-input class="global-none" v-model="formRegister.licenseImage"></el-input>
<el-upload <el-upload
class="upload-image" class="upload-image"
:class="uploadOption.license.image.length > 0 ? 'upload-none' : ''" :class="uploadOption.license.image.length > 0 ? 'upload-none' : ''"
ref="uploadLicense" ref="uploadLicense"
list-type="picture-card" list-type="picture-card"
:auto-upload="false" :auto-upload="false"
:limit="1" :limit="1"
:file-list="uploadOption.license.image" :file-list="uploadOption.license.image"
:action="uploadOption.license.url" :action="uploadOption.license.url"
:data="uploadOption.license.params" :data="uploadOption.license.params"
:on-preview="onUploadPreviewFile" :on-preview="onUploadPreviewFile"
:on-remove="(file, fileList) => { onUploadRemove('license', file, fileList) }" :on-remove="(file, fileList) => { onUploadRemove('license', file, fileList) }"
:on-change="(file, fileList) => { onUploadChange('license', file, fileList) }" :on-change="(file, fileList) => { onUploadChange('license', file, fileList) }"
:on-success="(respons, file, fileList) => { onUploadSuccess('license', respons, file, fileList) }" :on-success="(respons, file, fileList) => { onUploadSuccess('license', respons, file, fileList) }"
:on-error="(error) => { onUploadFail('license', error) }" :on-error="(error) => { onUploadFail('license', error) }"
> >
<div class="col"> <div class="col">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span>点击上传营业执照</span> <span>点击上传营业执照</span>
</div> </div>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<span>复印件需盖有公司印章,大小不超过5MB</span> <span>复印件需盖有公司印章,大小不超过5MB</span>
</div> </div>
</el-upload> </el-upload>
<div> <div>
<img src="../../assets/register-certificate.png" alt=""> <img src="../../assets/register-certificate.png" alt="">
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="是否参与网上竞价:" prop="isQuote"> <el-form-item label="是否参与网上竞价:" prop="isQuote">
<div> <div>
<el-radio-group v-model="formRegister.isQuote"> <el-radio-group v-model="formRegister.isQuote">
<el-radio label="0"></el-radio> <el-radio label="0"></el-radio>
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-if="formRegister.isQuote === '1'" label="上传竞价承诺书:" prop="quoteImage"> <el-form-item v-if="formRegister.isQuote === '1'" label="上传竞价承诺书:" prop="quoteImage">
<!-- 此处 input 是为了模拟校验而设置的隐藏组件 --> <!-- 此处 input 是为了模拟校验而设置的隐藏组件 -->
<el-input class="global-none" v-model="formRegister.quoteImage"></el-input> <el-input class="global-none" v-model="formRegister.quoteImage"></el-input>
<el-upload <el-upload
class="upload-file" class="upload-file"
ref="uploadQuote" ref="uploadQuote"
:auto-upload="false" :auto-upload="false"
:limit="1" :limit="1"
:file-list="uploadOption.quote.image" :file-list="uploadOption.quote.image"
:action="uploadOption.quote.url" :action="uploadOption.quote.url"
:data="uploadOption.quote.params" :data="uploadOption.quote.params"
:on-preview="onUploadDownloadFile" :on-preview="onUploadDownloadFile"
:on-remove="(file, fileList) => { onUploadRemove('quote', file, fileList) }" :on-remove="(file, fileList) => { onUploadRemove('quote', file, fileList) }"
:on-change="(file, fileList) => { onUploadChange('quote', file, fileList) }" :on-change="(file, fileList) => { onUploadChange('quote', file, fileList) }"
:on-success="(respons, file, fileList) => { onUploadSuccess('quote', respons, file, fileList) }" :on-success="(respons, file, fileList) => { onUploadSuccess('quote', respons, file, fileList) }"
:on-error="(error) => { onUploadFail('quote', error) }" :on-error="(error) => { onUploadFail('quote', error) }"
> >
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<span>(请查看</span> <span>(请查看</span>
<span class="global-color-red">网上竞价须知</span> <span class="global-color-red">网上竞价须知</span>
<span>,并下载</span> <span>,并下载</span>
<span class="global-cursor global-color-red" @click="onLoadStatement">网上竞价承诺书</span> <span class="global-cursor global-color-red" @click="onLoadStatement">网上竞价承诺书</span>
<span>,签名盖章后扫描上传,文件大小不超过5MB)</span> <span>,签名盖章后扫描上传,文件大小不超过5MB)</span>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="detail-title row align-c"> <div class="detail-title row align-c">
<span>税务信息</span> <span>税务信息</span>
</div> </div>
<div class="detail-content"> <div class="detail-content">
<el-form ref="formTax" key="formTax" :model="formRegister" :rules="rule" label-width="160px"> <el-form ref="formTax" key="formTax" :model="formRegister" :rules="rule" label-width="160px">
<el-form-item label="税务资质(单选):" prop="companyTax"> <el-form-item label="税务资质(单选):" prop="companyTax">
<el-radio-group v-model="formRegister.companyTax" :value="formRegister.companyTax"> <el-radio-group v-model="formRegister.companyTax" :value="formRegister.companyTax">
<el-radio label="0">一般纳税人</el-radio> <el-radio label="0">一般纳税人</el-radio>
<el-radio label="1">小规模纳税人</el-radio> <el-radio label="1">小规模纳税人</el-radio>
<el-radio label="2">非增值纳税人</el-radio> <el-radio label="2">非增值纳税人</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="发票类型(可多选):" prop="companyInvoice"> <el-form-item label="发票类型(单选):" prop="companyInvoice">
<el-checkbox-group v-model="formRegister.companyInvoice"> <el-radio-group v-model="formRegister.companyInvoice" :value="formRegister.companyInvoice">
<el-checkbox label="增值税专票"></el-checkbox> <el-radio label="1">增值税普票</el-radio>
<el-checkbox label="增值税普票"></el-checkbox> </el-radio-group>
<el-checkbox label="其他类型"></el-checkbox> </el-form-item>
</el-checkbox-group> <el-form-item label="公司名称:" prop="companyName">
</el-form-item> <span>{{formRegister.companyName}}</span>
<el-form-item label="公司名称:" prop="companyName"> </el-form-item>
<span>{{formRegister.companyName}}</span> <el-form-item label="纳税识别号:" prop="companyCode">
</el-form-item> <span>{{formRegister.companyCode}}</span>
<el-form-item label="纳税识别号:" prop="companyCode"> </el-form-item>
<span>{{formRegister.companyCode}}</span> <el-form-item label="税务登记地址:" prop="companyAddress">
</el-form-item> <span>{{formRegister.companyAddress}}</span>
<el-form-item label="税务登记地址:" prop="companyAddress"> </el-form-item>
<span>{{formRegister.companyAddress}}</span> <el-form-item label="公司电话:" prop="companyPhone">
</el-form-item> <el-input v-model="formRegister.companyPhone" maxlength="20" placeholder="请输入公司电话"></el-input>
<el-form-item label="公司电话:" prop="companyPhone"> </el-form-item>
<el-input v-model="formRegister.companyPhone" maxlength="20" placeholder="请输入公司电话"></el-input> <el-form-item label="开户行:" prop="bankName">
</el-form-item> <el-input v-model="formRegister.bankName" maxlength="20" placeholder="请输入开户行"></el-input>
<el-form-item label="开户行:" prop="bankName"> </el-form-item>
<el-input v-model="formRegister.bankName" maxlength="20" placeholder="请输入开户行"></el-input> <el-form-item label="银行账户:" prop="bankAccount">
</el-form-item> <el-input v-model="formRegister.bankAccount" maxlength="30" placeholder="请输入银行账户"></el-input>
<el-form-item label="银行账户:" prop="bankAccount"> </el-form-item>
<el-input v-model="formRegister.bankAccount" maxlength="30" placeholder="请输入银行账户"></el-input> </el-form>
</el-form-item> <el-form ref="formReceive" :model="formRegister" :rules="rule" label-width="160px">
</el-form> <el-form-item label="发票领取方式:">
</div> <el-radio-group v-model="formRegister.receiveType">
<el-radio label="0">寄送</el-radio>
<div class="detail-title row align-c"> <el-radio label="1">自取</el-radio>
<span>联系人信息</span> </el-radio-group>
</div> </el-form-item>
<div class="detail-content"> <template v-if="formRegister.receiveType === '0'">
<el-form ref="formPhone" :model="formRegister" :rules="rule" label-width="160px"> <el-form-item label="收件人:" prop="receiveContactor">
<el-form-item label="联系人姓名:" prop="corporationName"> <el-input v-model="formRegister.receiveContactor" maxlength="30" placeholder="请输入姓名"></el-input>
<el-input v-model="formRegister.corporationName" maxlength="30" placeholder="请输入联系人姓名"></el-input> </el-form-item>
</el-form-item> <el-form-item label="收件人电话:" prop="receiveMobile">
<el-form-item label="身份证号:" prop="corporationIdcard"> <el-input v-model="formRegister.receiveMobile" maxlength="20" placeholder="请输入电话"></el-input>
<el-input v-model="formRegister.corporationIdcard" maxlength="18" placeholder="请输入身份证号"></el-input> </el-form-item>
</el-form-item> <el-form-item label="收件地址:" prop="receiveArea">
<el-form-item label="联系人手机号:" prop="corporationPhone"> <currencyArea @change="onAreaChange"></currencyArea>
<span>{{formRegister.corporationPhone}}</span> </el-form-item>
</el-form-item> <el-form-item label="" prop="receiveAddress">
</el-form> <el-input v-model="formRegister.receiveAddress" maxlength="100" placeholder="请输入详细地址"></el-input>
</div> </el-form-item>
<div class="detail-content form-button"> </template>
<button class="global-cursor" @click="onSubmit()">确定</button> </el-form>
</div> </div>
</div>
<el-dialog :visible.sync="winUploadFile"> <div class="detail-title row align-c">
<img width="100%" :src="uploadFileUrl" alt=""> <span>联系人信息</span>
</el-dialog> </div>
</div> <div class="detail-content">
</template> <el-form ref="formPhone" :model="formRegister" :rules="rule" label-width="160px">
<el-form-item label="联系人姓名:" prop="corporationName">
<script> <el-input v-model="formRegister.corporationName" maxlength="30" placeholder="请输入联系人姓名"></el-input>
// 工具 </el-form-item>
import iHost from '@/common/js/host.js' <el-form-item label="身份证号:" prop="corporationIdcard">
import iRule from '@/common/js/rule/rule.js' <el-input v-model="formRegister.corporationIdcard" maxlength="18" placeholder="请输入身份证号"></el-input>
import iRequest from '@/common/js/request/request.js' </el-form-item>
<el-form-item label="联系人手机号:" prop="corporationPhone">
import iCurrencyMap from '@/components/currency-map.vue' <span>{{formRegister.corporationPhone}}</span>
</el-form-item>
export default { </el-form>
components: { </div>
currencyMap: iCurrencyMap,
}, <!-- 确定修改 -->
<div class="detail-content form-button">
data: function () { <button class="global-cursor" @click="onSubmit()">确定</button>
return { </div>
formRegister: {}, </div>
<el-dialog :visible.sync="winUploadFile">
// 上传组件配置 <img width="100%" :src="uploadFileUrl" alt="">
uploadOption: { </el-dialog>
license: { </div>
url: iHost.uploadFile, </template>
params: {
'file': '', <script>
'uploadPath': 'register/supplier/license/', // 工具
}, import iHost from '@/common/js/host.js'
image: [] import iRule from '@/common/js/rule/rule.js'
}, import iRequest from '@/common/js/request/request.js'
quote: {
url: iHost.uploadFile, import iCurrencyMap from '@/components/currency-map.vue'
params: { import iCurrencyArea from '@/components/currency-area.vue'
'file': '',
'uploadPath': 'register/supplier/license/', export default {
}, components: {
image: [] currencyMap: iCurrencyMap,
}, currencyArea: iCurrencyArea,
}, },
uploadFileUrl: '',
winUploadFile: false, data: function () {
return {
formRegister: {},
// 邮箱验证按钮控制 // 上传组件配置
disabledEmail: false, // 按钮点击状态 uploadOption: {
disabledEmailMax: 60, // 最大秒数 license: {
disabledEmailText: '', // 计时文本 url: iHost.uploadFile,
disabledEmailTime: 0, // 计时数字 params: {
disabledEmailTimer: 0, // 计时器 'file': '',
'uploadPath': 'register/supplier/license/',
// 手机短信按钮控制 },
disabledPhone: false, // 按钮点击状态 image: []
disabledPhoneMax: 60, // 最大秒数 },
disabledPhoneText: '', // 计时文本 quote: {
disabledPhoneTime: 0, // 计时数字 url: iHost.uploadFile,
disabledPhoneTimer: 0, // 计时器 params: {
'file': '',
// 表单验证 'uploadPath': 'register/supplier/license/',
rule: { },
companyName: [ image: []
{ required: true, message: '请输入公司名称', trigger: 'blur' }, },
{ validator: iRule.predefineRoutineText, trigger: 'blur'} },
], uploadFileUrl: '',
companyShortName: [ winUploadFile: false,
{ required: true, message: '请输入公司简称', trigger: 'blur' },
{ validator: iRule.predefineRoutineText, trigger: 'blur'}
],
companyCode: [ // 邮箱验证按钮控制
{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }, disabledEmail: false, // 按钮点击状态
{ validator: iRule.predefineNumeralText, message: '请正确输入统一社会信用代码', trigger: 'blur'} disabledEmailMax: 60, // 最大秒数
], disabledEmailText: '', // 计时文本
companyAddress: [ disabledEmailTime: 0, // 计时数字
{ required: true, message: '请输入登记地址', trigger: 'blur' }, disabledEmailTimer: 0, // 计时器
{ validator: iRule.predefineRoutineText, trigger: 'blur'}
], // 手机短信按钮控制
email: [ disabledPhone: false, // 按钮点击状态
{ required: true, message: '请输入机构邮箱', trigger: 'blur' }, disabledPhoneMax: 60, // 最大秒数
{ validator: iRule.email, message: '请正确输入邮箱', trigger: 'blur'} disabledPhoneText: '', // 计时文本
], disabledPhoneTime: 0, // 计时数字
emailCode: [ disabledPhoneTimer: 0, // 计时器
{ required: true, message: '请输入验证码', trigger: 'blur' },
{ validator: iRule.predefineNumeral, message: '请正确输入验证码', trigger: 'blur'} // 表单验证
], rule: {
licenseImage: [ companyName: [
{ required: true, message: '请上传营业执照', trigger: 'blur' } { required: true, message: '请输入公司名称', trigger: 'blur' },
], { validator: iRule.predefineRoutineText, trigger: 'blur'}
quoteImage: [ ],
{ required: true, message: '请上传网上竞价承诺书', trigger: 'blur' } companyShortName: [
], { required: true, message: '请输入公司简称', trigger: 'blur' },
companyTax: [ { validator: iRule.predefineRoutineText, trigger: 'blur'}
{ required: true, message: '请选择税务资质', trigger: 'blur' } ],
], companyCode: [
companyInvoice: [ { required: true, message: '请输入统一社会信用代码', trigger: 'blur' },
{ type: 'array', required: true, message: '请选择发票类型', trigger: 'change' } { validator: iRule.predefineNumeralText, message: '请正确输入统一社会信用代码', trigger: 'blur'}
], ],
companyPhone: [ companyAddress: [
{ required: true, message: '请输入公司电话', trigger: 'blur' }, { required: true, message: '请输入登记地址', trigger: 'blur' },
{ validator: iRule.fixedPhone, message: '请正确输入公司电话', trigger: 'blur'} { validator: iRule.predefineRoutineText, trigger: 'blur'}
], ],
bankName: [ email: [
{ required: true, message: '请输入开户行', trigger: 'blur' }, { required: true, message: '请输入机构邮箱', trigger: 'blur' },
{ validator: iRule.predefineRoutineText, message: '请正确输入开户行', trigger: 'blur'} { validator: iRule.email, message: '请正确输入邮箱', trigger: 'blur'}
], ],
bankAccount: [ emailCode: [
{ required: true, message: '请输入银行账号', trigger: 'blur' }, { required: true, message: '请输入验证码', trigger: 'blur' },
{ validator: iRule.predefineNumeral, message: '请正确输入银行账号', trigger: 'blur'} { validator: iRule.predefineNumeral, message: '请正确输入验证码', trigger: 'blur'}
], ],
corporationName: [ licenseImage: [
{ required: true, message: '请输入联系人姓名', trigger: 'blur' }, { required: true, message: '请上传营业执照', trigger: 'blur' }
{ validator: iRule.predefineRoutineText, message: '请正确输入姓名', trigger: 'blur'} ],
], quoteImage: [
corporationIdcard: [ { required: true, message: '请上传网上竞价承诺书', trigger: 'blur' }
{ required: true, message: '请输入身份证号', trigger: 'blur' }, ],
{ validator: iRule.idCard, message: '请正确输入身份证号', trigger: 'blur'} companyTax: [
], { required: true, message: '请选择税务资质', trigger: 'blur' }
corporationPhone: [ ],
{ required: true, message: '请输入联系人手机号', trigger: 'blur' }, companyInvoice: [
{ validator: iRule.phone, message: '请正确输入手机号码', trigger: 'blur'} { required: true, message: '请选择发票类型', trigger: 'blur' }
], ],
phoneCode: [ companyPhone: [
{ required: true, message: '请输入验证码', trigger: 'blur' }, { required: true, message: '请输入公司电话', trigger: 'blur' },
{ validator: iRule.predefineNumeral, message: '请正确输入验证码', trigger: 'blur'} { validator: iRule.fixedPhone, message: '请正确输入公司电话', trigger: 'blur'}
], ],
password: [ bankName: [
{ required: true, message: '请设置登录密码', trigger: 'blur' }, { required: true, message: '请输入开户行', trigger: 'blur' },
{ min: 6, max: 20, message: '6-20个字符,数字、英文字母及标点符号至少2种(除空格)', trigger: 'blur' }, { validator: iRule.predefineRoutineText, message: '请正确输入开户行', trigger: 'blur'}
{ validator: iRule.unSpace, message: '不能包含空格', trigger: 'blur'}, ],
{ validator: iRule.unEmoji, message: '不能包含 emoji 表情', trigger: 'blur'}, bankAccount: [
{ validator: iRule.unChinese, message: '不能包含中文', trigger: 'blur'}, { required: true, message: '请输入银行账号', trigger: 'blur' },
{ validator: iRule.password, message: '6-20个字符,数字、英文字母及标点符号至少2种(除空格)', trigger: 'blur'} { validator: iRule.predefineNumeral, message: '请正确输入银行账号', trigger: 'blur'}
], ],
passwordRepeat: [ corporationName: [
{ required: true, message: '请再次输入登录密码', trigger: 'blur' }, { required: true, message: '请输入联系人姓名', trigger: 'blur' },
{ validator: (funcRule, funcValue, funcCallback) => iRule.passwordRepeat(funcRule, funcValue, funcCallback, this.formRegister.password), message: '与登录密码不一致,请重新输入', trigger: 'blur'} { validator: iRule.predefineRoutineText, message: '请正确输入姓名', trigger: 'blur'}
], ],
}, corporationIdcard: [
} { required: true, message: '请输入身份证号', trigger: 'blur' },
}, { validator: iRule.idCard, message: '请正确输入身份证号', trigger: 'blur'}
computed: { ],
info: function () { corporationPhone: [
return this.$store.state.info { required: true, message: '请输入联系人手机号', trigger: 'blur' },
}, { validator: iRule.phone, message: '请正确输入手机号码', trigger: 'blur'}
}, ],
watch: { phoneCode: [
info: { { required: true, message: '请输入验证码', trigger: 'blur' },
handler: function (funcNewValue, funcOldValue) { { validator: iRule.predefineNumeral, message: '请正确输入验证码', trigger: 'blur'}
],
}, receiveContactor: [
deep: true, { required: true, message: '请输入收件人姓名', trigger: 'blur' },
immediate: true, { validator: iRule.predefineRoutineText, message: '请正确输入姓名', trigger: 'blur'}
}, ],
}, receiveMobile: [
{ required: true, message: '请输入收件人电话', trigger: 'blur' },
created: function () { { validator: iRule.fixedPhone, message: '请正确输入收件人电话', trigger: 'blur'}
this.reset() ],
this.init() receiveArea: [
}, { required: true, message: '请输入详细地址', trigger: 'blur' },
{ validator: iRule.predefineRoutineText, trigger: 'blur'}
methods: { ],
init: function () { receiveAddress: [
iRequest.request(iHost.base + 'bid/zUserCompany/getUserInfo', {}, 'json', 'get') { required: true, message: '请输入详细地址', trigger: 'blur' },
.then((funcResponse) => { { validator: iRule.predefineRoutineText, trigger: 'blur'}
// 每次查询更新用户缓存信息 ],
let funcInfo = this.$store.state.info },
funcInfo.register = Number(funcResponse.registerState) }
this.$store.commit('info', funcInfo) },
localStorage.setItem('info', JSON.stringify(funcInfo)) computed: {
info: function () {
this.formRegister = { return this.$store.state.info
'companyName': funcResponse.companyName, },
'companyShortName': funcResponse.shortName, },
'companyCode': funcResponse.companyCode, watch: {
'companyAddress': funcResponse.address, info: {
'email': funcResponse.email, handler: function (funcNewValue, funcOldValue) {
'licenseImage': funcResponse.license,
'quoteImage': funcResponse.bidStatement, },
'isQuote': funcResponse.isJoinBid, deep: true,
immediate: true,
'companyTax': funcResponse.taxType, },
'companyInvoice': funcResponse.invoiceType.split(','), },
'companyPhone': funcResponse.phone,
'bankName': funcResponse.openBank, created: function () {
'bankAccount': funcResponse.bankAccount, this.reset()
this.init()
'corporationName': funcResponse.contactName, },
'corporationIdcard': funcResponse.idcard,
'corporationPhone': funcResponse.mobile, methods: {
init: function () {
'timeExamine': funcResponse.auditCreatDate, iRequest.request(iHost.base + 'bid/zUserCompany/getUserInfo', {}, 'json', 'get')
'timeExaminePass': funcResponse.auditTime, .then((funcResponse) => {
'examineState': Number(funcResponse.auditState) console.log(funcResponse)
}
// 每次查询更新用户缓存信息
// 设置税务类型 let funcInfo = this.$store.state.info
for (let i = 0, len = this.formRegister.companyInvoice.length; i < len; i++) { funcInfo.register = Number(funcResponse.registerState)
switch (Number(this.formRegister.companyInvoice[i])) { this.$store.commit('info', funcInfo)
case 0: localStorage.setItem('info', JSON.stringify(funcInfo))
this.formRegister.companyInvoice[i] = '增值税专票'
break this.formRegister = {
'companyName': funcResponse.companyName,
case 1: 'companyShortName': funcResponse.shortName,
this.formRegister.companyInvoice[i] = '增值税普票' 'companyCode': funcResponse.companyCode,
break 'companyAddress': funcResponse.address,
'email': funcResponse.email,
case 2: 'licenseImage': funcResponse.license,
this.formRegister.companyInvoice[i] = '其他类型' 'quoteImage': funcResponse.bidStatement,
break 'isQuote': funcResponse.isJoinBid,
}
} 'companyTax': funcResponse.taxType,
'companyInvoice': '1',
// 设置营业执照图片 // 'companyInvoice': funcResponse.invoiceType.split(','),
this.uploadOption.license.image.push({ 'companyPhone': funcResponse.phone,
'status': 'success', 'bankName': funcResponse.openBank,
'url': this.formRegister.licenseImage, 'bankAccount': funcResponse.bankAccount,
'name': 'image.png',
'size': 100, // 开票相关
'percentage': 100, 'receiveType': funcResponse.receiveType ? funcResponse.receiveType : '0',
'uid': 1592304942343 'receiveContactor': funcResponse.receiveContactor ? funcResponse.receiveContactor : '',
}) 'receiveMobile': funcResponse.receiveMobile ? funcResponse.receiveMobile : '',
'receiveArea': funcResponse.receiveArea ? JSON.parse(funcResponse.receiveArea) : '',
// 设置竞技承诺书图片 'receiveAddress': funcResponse.receiveAddress ? funcResponse.receiveAddress : '',
if (this.formRegister.isQuote === '1') {
this.uploadOption.quote.image.push({ 'corporationName': funcResponse.contactName,
'status': 'success', 'corporationIdcard': funcResponse.idcard,
'url': this.formRegister.quoteImage, 'corporationPhone': funcResponse.mobile,
'name': 'image.png',
'size': 100, 'timeExamine': funcResponse.auditCreatDate,
'percentage': 100, 'timeExaminePass': funcResponse.auditTime,
'uid': 1592304942344 'examineState': Number(funcResponse.auditState),
}) }
}
}) // 恢复区域数据
.catch((funcError) => { if (this.formRegister.receiveArea) {
this.$message.error(funcError.message) this.$store.commit('areaSelection', this.formRegister.receiveArea)
}) }
}, console.log(this.formRegister)
reset: function () {
this.formRegister = { // 设置营业执照图片
'companyName': '', this.uploadOption.license.image.push({
'companyShortName': '', 'status': 'success',
'companyCode': '', 'url': this.formRegister.licenseImage,
'companyAddress': '', 'name': 'image.png',
'email': '', 'size': 100,
'licenseImage': '', 'percentage': 100,
'quoteImage': '', 'uid': 1592304942343
})
'companyTax': '',
'companyInvoice': [], // 设置竞技承诺书图片
'companyPhone': '', if (this.formRegister.isQuote === '1') {
'bankName': '', this.uploadOption.quote.image.push({
'bankAccount': '', 'status': 'success',
'url': this.formRegister.quoteImage,
'corporationName': '', 'name': 'image.png',
'corporationIdcard': '', 'size': 100,
'corporationPhone': '', 'percentage': 100,
'uid': 1592304942344
'timeExamine': '', })
'timeExaminePass': '', }
'examineState': '', })
} .catch((funcError) => {
}, this.$message.error(funcError.message)
})
registerInfo: function () { },
console.log(JSON.stringify( this.uploadOption)) reset: function () {
let funcParam = { this.formRegister = {
'companyName': this.formRegister.companyName, 'companyName': '',
'companyCode': this.formRegister.companyCode, 'companyShortName': '',
'shortName': this.formRegister.companyShortName, 'companyCode': '',
'address': this.formRegister.companyAddress, 'companyAddress': '',
'email': this.formRegister.email, 'email': '',
'license': this.uploadOption.license.image[0].url, 'licenseImage': '',
'bidStatement': this.formRegister.isQuote === '0' ? '' : this.uploadOption.quote.image[0].url, 'quoteImage': '',
'isJoinBid': this.formRegister.isQuote,
'taxType': this.formRegister.companyTax, 'companyTax': '',
'phone': this.formRegister.companyPhone, 'companyInvoice': '',
'invoiceType': this.formRegister.companyInvoice, 'companyPhone': '',
'openBank': this.formRegister.bankName, 'bankName': '',
'bankAccount': this.formRegister.bankAccount, 'bankAccount': '',
'contactName': this.formRegister.corporationName,
'idcard': this.formRegister.corporationIdcard, 'corporationName': '',
} 'corporationIdcard': '',
'corporationPhone': '',
for (let i = 0, len = funcParam.invoiceType.length; i < len; i++) {
if (funcParam.invoiceType[i] === '增值税专票') funcParam.invoiceType[i] = 0 'timeExamine': '',
if (funcParam.invoiceType[i] === '增值税普票') funcParam.invoiceType[i] = 1 'timeExaminePass': '',
if (funcParam.invoiceType[i] === '其他类型') funcParam.invoiceType[i] = 2 'examineState': '',
} }
},
funcParam.invoiceType = funcParam.invoiceType.join()
iRequest.request(iHost.base + 'bid/zUserCompany/saveUserInfo', funcParam, 'json', 'post') registerInfo: function () {
.then((funcResponse) => { console.log(JSON.stringify( this.uploadOption))
this.$message({ message: '修改已提交,请等待审核', type: 'success' }) let funcParam = {
this.$router.push('/supplier/info') 'companyName': this.formRegister.companyName,
}) 'companyCode': this.formRegister.companyCode,
.catch((funcError) => { 'shortName': this.formRegister.companyShortName,
// this.$message.error(funcError.message) 'address': this.formRegister.companyAddress,
}) 'email': this.formRegister.email,
}, 'license': this.uploadOption.license.image[0].url,
'bidStatement': this.formRegister.isQuote === '0' ? '' : this.uploadOption.quote.image[0].url,
/** 'isJoinBid': this.formRegister.isQuote,
* 下载申明 'taxType': this.formRegister.companyTax,
* @function 'phone': this.formRegister.companyPhone,
* @returns 'invoiceType': '1',
*/ 'openBank': this.formRegister.bankName,
onLoadStatement: function () { 'bankAccount': this.formRegister.bankAccount,
window.location.href = '../../static/quote.zip' 'contactName': this.formRegister.corporationName,
}, 'idcard': this.formRegister.corporationIdcard,
onSubmit: function () { 'receiveType': this.formRegister.receiveType,
this.$refs.formBase.validate(funcValid => { 'receiveContactor': this.formRegister.receiveContactor,
if (funcValid) { 'receiveMobile': this.formRegister.receiveMobile,
if (this.uploadOption.license.image[0].status === 'ready') { 'receiveArea': this.formRegister.receiveArea,
this.$refs.uploadLicense.submit() 'receiveAddress': this.formRegister.receiveAddress
return }
}
// for (let i = 0, len = funcParam.invoiceType.length; i < len; i++) {
if (this.uploadOption.quote.image[0].status === 'ready') { // if (funcParam.invoiceType[i] === '增值税专票') funcParam.invoiceType[i] = 0
this.$refs.uploadQuote.submit() // if (funcParam.invoiceType[i] === '增值税普票') funcParam.invoiceType[i] = 1
return // if (funcParam.invoiceType[i] === '其他类型') funcParam.invoiceType[i] = 2
} // }
this.registerInfo()
} // funcParam.invoiceType = funcParam.invoiceType.join()
}) iRequest.request(iHost.base + 'bid/zUserCompany/saveUserInfo', funcParam, 'json', 'post')
}, .then((funcResponse) => {
this.$message({ message: '修改已提交,请等待审核', type: 'success' })
/** this.$router.push('/supplier/info')
* 上传组件 - 文件格式 })
* @function .catch((funcError) => {
* @param {string} funcType // this.$message.error(funcError.message)
* @param {object} funcFile })
* @returns },
*/
checkFileFormat: function (funcType, funcFile) { /**
switch (funcType) { * 下载申明
case 'license': * @function
if (funcFile.raw.type !== 'image/png' && funcFile.raw.type !== 'image/jpeg') { * @returns
this.$message.error('仅支持JPG、PNG格式图片') */
return false onLoadStatement: function () {
} window.location.href = '../../static/quote.zip'
if (funcFile.size >= 6291456) { },
this.$message.error('文件大小不超过5MB')
return false /**
} * 地域选择组件
break * @function
} * @param {array } funcArea - ['省份', '城市', '区域' ]
return true * @returns
}, */
onAreaChange: function (funcArea) {
/** console.log(funcArea)
* 上传组件 - 文件状态 this.formRegister.receiveArea = funcArea
* @function },
* @param {string} funcType
* @param {object} funcFile onSubmit: function () {
* @param {array } funcFileList console.log(this.formRegister)
* @returns let funcPass = true
*/ this.$refs.formTax.validate((funcValid) => {
onUploadChange: function (funcType, funcFile, funcFileList) { funcPass = funcValid
if (funcFile.status === 'ready') { })
if (this.checkFileFormat(funcType, funcFile)) { if (!funcPass) return
// 针对 ie 浏览器不支持 new file 功能直接放过
try { this.$refs.formPhone.validate((funcValid) => {
// 重新定义上传文件名称 funcPass = funcValid
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length) })
let funcFileName = funcType + (new Date() - 0) + funcFileFormat if (!funcPass) return
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid this.$refs.formReceive.validate((funcValid) => {
funcFile.raw = funcCopyFile funcPass = funcValid
funcFile.name = funcFileName })
} catch (err) { if (!funcPass) return
} this.$refs.formBase.validate(funcValid => {
if (funcValid) {
if (this.uploadOption.license.image[0].status === 'ready') {
this.formRegister[funcType + 'Image'] = 'image' this.$refs.uploadLicense.submit()
this.uploadOption[funcType].image.push(funcFile) return
console.log('push', this.uploadOption[funcType].image) }
} else {
let funcImageBuffer = JSON.stringify(this.uploadOption[funcType].image) if (this.uploadOption.quote.image[0].status === 'ready') {
this.uploadOption[funcType].image = [] this.$refs.uploadQuote.submit()
this.uploadOption[funcType].image = JSON.parse(funcImageBuffer) return
} }
} this.registerInfo()
}
if (funcFile.status === 'success') { })
for (let i = 0, len = this.uploadOption[funcType].image.length; i < len; i++) { },
if (this.uploadOption[funcType].image[i].status === 'ready') {
return /**
} * 上传组件 - 文件格式
} * @function
* @param {string} funcType
this.registerInfo() * @param {object} funcFile
} * @returns
}, */
checkFileFormat: function (funcType, funcFile) {
/** switch (funcType) {
* 上传组件 - 文件删除 case 'license':
* @function if (funcFile.raw.type !== 'image/png' && funcFile.raw.type !== 'image/jpeg') {
* @param {string} funcType this.$message.error('仅支持JPG、PNG格式图片')
* @param {object} funcFile return false
* @param {array } funcFileList }
* @returns if (funcFile.size >= 6291456) {
*/ this.$message.error('文件大小不超过5MB')
onUploadRemove: function (funcType, funcFile, funcFileList) { return false
console.log('onUploadRemove', funcFile) }
// 判断当前文件列表是否存在删除图片 break
// 找到列表中的文件进行删除 }
let funcImageList = this.uploadOption[funcType].image return true
for (let i = 0, len = funcImageList.length; i < len; i++) { },
if (funcImageList[i] && funcImageList[i].uid === funcFile.uid) {
funcImageList.splice(i, 1) /**
break * 上传组件 - 文件状态
} * @function
} * @param {string} funcType
* @param {object} funcFile
// 删除文件逻辑 * @param {array } funcFileList
// 如果当前文件列表为空则不通过校验 * @returns
if (funcImageList.length === 0) { */
this.formRegister[funcType + 'Image'] = '' onUploadChange: function (funcType, funcFile, funcFileList) {
} if (funcFile.status === 'ready') {
}, if (this.checkFileFormat(funcType, funcFile)) {
// 针对 ie 浏览器不支持 new file 功能直接放过
/** try {
* 上传组件 - 文件预览 // 重新定义上传文件名称
* @function let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
* @param {object} funcFile let funcFileName = funcType + (new Date() - 0) + funcFileFormat
* @returns let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
*/ funcCopyFile.uid = funcFile.raw.uid
onUploadPreviewFile(funcFile) { funcFile.raw = funcCopyFile
this.uploadFileUrl = funcFile.url funcFile.name = funcFileName
this.winUploadFile = true } catch (err) {
},
}
/**
* 上传组件 - 文件下载
* @function this.formRegister[funcType + 'Image'] = 'image'
* @param {object} funcFile this.uploadOption[funcType].image.push(funcFile)
* @returns console.log('push', this.uploadOption[funcType].image)
*/ } else {
onUploadDownloadFile: function (funcFile) { let funcImageBuffer = JSON.stringify(this.uploadOption[funcType].image)
switch (funcFile.status) { this.uploadOption[funcType].image = []
case 'ready': this.uploadOption[funcType].image = JSON.parse(funcImageBuffer)
// 重新上传的文件下载 }
let funcReader = new FileReader() }
funcReader.readAsArrayBuffer(funcFile.raw)
funcReader.onload = function(funcEvent){ if (funcFile.status === 'success') {
let funcBlob = new Blob([funcEvent.target.result], { type : funcFile.raw.type }) for (let i = 0, len = this.uploadOption[funcType].image.length; i < len; i++) {
if (this.uploadOption[funcType].image[i].status === 'ready') {
if (window.navigator.msSaveBlob) { return
window.navigator.msSaveBlob(funcBlob, funcFile.raw.name) }
} else { }
let funcDownloadLink = document.createElement('a')
funcDownloadLink.download = funcFile.raw.name this.registerInfo()
funcDownloadLink.href = URL.createObjectURL(funcBlob) }
document.body.appendChild(funcDownloadLink) },
funcDownloadLink.click()
document.body.removeChild(funcDownloadLink) /**
} * 上传组件 - 文件删除
} * @function
break * @param {string} funcType
* @param {object} funcFile
case 'success': * @param {array } funcFileList
// 已经上传过的文件下载 * @returns
window.open(funcFile.url, funcFile.name) */
return onUploadRemove: function (funcType, funcFile, funcFileList) {
const funcDownloadLink = document.createElement('a') console.log('onUploadRemove', funcFile)
funcDownloadLink.setAttribute('href', funcFile.url) // 判断当前文件列表是否存在删除图片
funcDownloadLink.setAttribute('download' , 'download') // 找到列表中的文件进行删除
funcDownloadLink.click() let funcImageList = this.uploadOption[funcType].image
break for (let i = 0, len = funcImageList.length; i < len; i++) {
} if (funcImageList[i] && funcImageList[i].uid === funcFile.uid) {
}, funcImageList.splice(i, 1)
break
/** }
* 上传组件 - 上传成功 }
* @function
* @param {string} funcType // 删除文件逻辑
* @param {object} funcResponse // 如果当前文件列表为空则不通过校验
* @returns if (funcImageList.length === 0) {
*/ this.formRegister[funcType + 'Image'] = ''
onUploadSuccess: function (funcType, funcResponse, funcFile, funcFileList) { }
// 文件上传成功之后替换文件临时路径 },
if (funcResponse.code === 200) {
let funcImageList = this.uploadOption[funcType].image /**
for (let i = 0, len = funcImageList.length; i < len; i++) { * 上传组件 - 文件预览
if (funcImageList[i] && funcImageList[i].uid === funcFile.uid) { * @function
funcImageList[i].url = iHost.resources + funcResponse.data.url * @param {object} funcFile
break * @returns
} */
} onUploadPreviewFile(funcFile) {
this.uploadFileUrl = funcFile.url
this.uploadOption[funcType].image = funcImageList this.winUploadFile = true
console.log('this.uploadOption[funcType].image', this.uploadOption[funcType].image) },
}
}, /**
* 上传组件 - 文件下载
/** * @function
* 上传组件 - 上传失败 * @param {object} funcFile
* @function * @returns
* @param {string} funcType */
* @param {object} funcError onUploadDownloadFile: function (funcFile) {
* @returns switch (funcFile.status) {
*/ case 'ready':
onUploadFail: function (funcType, funcError) { // 重新上传的文件下载
let funcReader = new FileReader()
}, funcReader.readAsArrayBuffer(funcFile.raw)
} funcReader.onload = function(funcEvent){
} let funcBlob = new Blob([funcEvent.target.result], { type : funcFile.raw.type })
</script>
if (window.navigator.msSaveBlob) {
<style lang="less"> window.navigator.msSaveBlob(funcBlob, funcFile.raw.name)
.supplier-info { } else {
width: 100%; let funcDownloadLink = document.createElement('a')
funcDownloadLink.download = funcFile.raw.name
.supplier-map { funcDownloadLink.href = URL.createObjectURL(funcBlob)
height: 66px; document.body.appendChild(funcDownloadLink)
border-bottom: 1px #EFEFEF solid; funcDownloadLink.click()
} document.body.removeChild(funcDownloadLink)
}
.detail-operation { }
height: 40px; break
margin-top: 24px;
case 'success':
button { // 已经上传过的文件下载
width: 106px; window.open(funcFile.url, funcFile.name)
height: 36px; return
margin-left: 12px; const funcDownloadLink = document.createElement('a')
border:1px solid @colorBlue; funcDownloadLink.setAttribute('href', funcFile.url)
border-radius: 18px; funcDownloadLink.setAttribute('download' , 'download')
color: @colorBlue; funcDownloadLink.click()
background: #FFFFFF; break
font-size: @fontSize02; }
} },
}
/**
.supplier-set { * 上传组件 - 上传成功
width: 100%; * @function
* @param {string} funcType
.detail-title { * @param {object} funcResponse
width: 100%; * @returns
height: 50px; */
margin-bottom: 24px; onUploadSuccess: function (funcType, funcResponse, funcFile, funcFileList) {
border-bottom: 1px #F2F2F2 solid; // 文件上传成功之后替换文件临时路径
if (funcResponse.code === 200) {
span { let funcImageList = this.uploadOption[funcType].image
font-size: @fontSize04; for (let i = 0, len = funcImageList.length; i < len; i++) {
} if (funcImageList[i] && funcImageList[i].uid === funcFile.uid) {
} funcImageList[i].url = iHost.resources + funcResponse.data.url
break
.detail-title:before{ }
content: ''; }
display: inline-block;
width: 4px; this.uploadOption[funcType].image = funcImageList
height: 20px; console.log('this.uploadOption[funcType].image', this.uploadOption[funcType].image)
margin-right: 10px; }
overflow: hidden; },
background-image: linear-gradient(#CF2F1E 20%, #00468C 20%, #00468C 100%);
} /**
* 上传组件 - 上传失败
.detail-content { * @function
width: 660px; * @param {string} funcType
margin: 20px 0; * @param {object} funcError
* @returns
.el-form { */
width: 100%; onUploadFail: function (funcType, funcError) {
.upload-image { },
.el-upload-list { }
display: flex; }
flex-wrap: wrap; </script>
li { <style lang="less">
width: 146px; .supplier-info {
height: 146px; width: 100%;
margin-right: 8px;
.supplier-map {
img { height: 66px;
max-width: 100%; border-bottom: 1px #EFEFEF solid;
max-height: 100%; }
object-fit: contain;
} .detail-operation {
} height: 40px;
} margin-top: 24px;
.el-upload { button {
position: relative; width: 106px;
width: 186px; height: 36px;
height: 256px; margin-left: 12px;
padding-top: 40px; border:1px solid @colorBlue;
border-radius: 18px;
> div { color: @colorBlue;
position: absolute; background: #FFFFFF;
top: 80px; font-size: @fontSize02;
width: 100%; }
} }
}
} .supplier-set {
width: 100%;
.upload-file {
a { .detail-title {
cursor: pointer; width: 100%;
} height: 50px;
} margin-bottom: 24px;
} border-bottom: 1px #F2F2F2 solid;
.register-info-certificate { span {
> div { font-size: @fontSize04;
display: flex; }
flex-direction: row; }
> div { .detail-title:before{
margin-right: 24px; content: '';
} display: inline-block;
width: 4px;
> div:nth-child(2) { height: 20px;
white-space: nowrap; margin-right: 10px;
} overflow: hidden;
} background-image: linear-gradient(#CF2F1E 20%, #00468C 20%, #00468C 100%);
} }
.upload-none { .detail-content {
> div { width: 660px;
display: none; margin: 20px 0;
}
} .el-form {
} width: 100%;
.form-button button { .upload-image {
width: 160px; .el-upload-list {
height: 52px; display: flex;
margin-left: 160px; flex-wrap: wrap;
margin-bottom: 50px;
background: @colorBlue; li {
border-radius: 26px; width: 146px;
border: none; height: 146px;
font-size: @fontSize02; margin-right: 8px;
color: #ffffff;
} img {
} max-width: 100%;
} max-height: 100%;
object-fit: contain;
}
}
}
.el-upload {
position: relative;
width: 186px;
height: 256px;
padding-top: 40px;
> div {
position: absolute;
top: 80px;
width: 100%;
}
}
}
.upload-file {
a {
cursor: pointer;
}
}
}
.register-info-certificate {
> div {
display: flex;
flex-direction: row;
> div {
margin-right: 24px;
}
> div:nth-child(2) {
white-space: nowrap;
}
}
}
.upload-none {
> div {
display: none;
}
}
}
.form-button button {
width: 160px;
height: 52px;
margin-left: 160px;
margin-bottom: 50px;
background: @colorBlue;
border-radius: 26px;
border: none;
font-size: @fontSize02;
color: #ffffff;
}
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 账号管理 - 企业信息 --> <!-- 账号管理 - 企业信息 -->
<div class="supplier-info"> <div class="supplier-info">
<!-- 页面地图 --> <!-- 页面地图 -->
<div class="supplier-map row align-c"> <div class="supplier-map row align-c">
<currencyMap :customPath="[{ text: '企业信息', redirect: null }]"></currencyMap> <currencyMap :customPath="[{ text: '企业信息', redirect: null }]"></currencyMap>
</div> </div>
<div class="supplier-examine col"> <div class="supplier-examine col">
<span v-if="formInfo.examineState === 0" class="state-ongoing">审核中</span> <span v-if="formInfo.examineState === 0" class="state-ongoing">审核中</span>
<span v-if="formInfo.examineState === 0">企业信息审核中</span> <span v-if="formInfo.examineState === 0">企业信息审核中</span>
<span v-if="formInfo.examineState === 0">{{'提交时间:' + formInfo.timeExamineSubmit}}</span> <span v-if="formInfo.examineState === 0">{{'提交时间:' + formInfo.timeExamineSubmit}}</span>
<span v-if="formInfo.examineState === 1" class="state-pass">审核通过</span> <span v-if="formInfo.examineState === 1" class="state-pass">审核通过</span>
<span v-if="formInfo.examineState === 1">{{'审核时间:' + formInfo.timeExaminePass}}</span> <span v-if="formInfo.examineState === 1">{{'审核时间:' + formInfo.timeExaminePass}}</span>
<span v-if="formInfo.examineState === 2" class="state-refuse">审核不通过</span> <span v-if="formInfo.examineState === 2" class="state-refuse">审核不通过</span>
<span v-if="formInfo.examineState === 2">{{'不通过原因:' + formInfo.examineReason}}</span> <span v-if="formInfo.examineState === 2">{{'不通过原因:' + formInfo.examineReason}}</span>
<span v-if="formInfo.examineState === 2">{{'审核时间:' + formInfo.timeExaminePass}}</span> <span v-if="formInfo.examineState === 2">{{'审核时间:' + formInfo.timeExaminePass}}</span>
</div> </div>
<!-- 项目进度 - 采购 --> <!-- 项目进度 - 采购 -->
<div class="supplier-operation"> <div class="supplier-operation">
<!-- <button @click="onChange()">修改</button> --> <button v-if="formInfo.examineState !== 0" @click="onChange()">修改</button>
<button v-if="formInfo.examineState !== 0" @click="onChange()">修改</button> <button @click="onChangeRecord()">变更记录</button>
<button @click="onChangeRecord()">变更记录</button> </div>
</div>
<div class="supplier-set col">
<div class="supplier-set col"> <div class="detail-title row align-c">
<div class="detail-title row align-c"> <span>基本信息</span>
<span>基本信息</span> </div>
</div> <div class="detail-content">
<div class="detail-content"> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>机构名称:</span>
<span>机构名称:</span> <span>{{formInfo.companyName}}</span>
<span>{{formInfo.companyName}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>机构简称:</span>
<span>机构简称:</span> <span>{{formInfo.companyShortName}}</span>
<span>{{formInfo.companyShortName}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>统一社会信用代码:</span>
<span>统一社会信用代码:</span> <span>{{formInfo.companyCode}}</span>
<span>{{formInfo.companyCode}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>登记地址:</span>
<span>登记地址:</span> <span>{{formInfo.companyAddress}}</span>
<span>{{formInfo.companyAddress}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>机构邮箱:</span>
<span>机构邮箱:</span> <span>{{formInfo.email}}</span>
<span>{{formInfo.email}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c" v-if="formInfo.quoteImage"> <span>是否参与网上竞价:</span>
<span>竞价承诺书:</span> <span>{{formInfo.isQuote === '0' ? '否' : '是'}}</span>
<el-button size="small" type="primary" @click.prevent="onUploadDownloadFile">点击下载</el-button> </div>
</div> <div class="item-text row align-c" v-if="formInfo.quoteImage">
<div class="item-text row"> <span>竞价承诺书:</span>
<span>营业执照:</span> <el-button size="small" type="primary" @click.prevent="onUploadDownloadFile">点击下载</el-button>
<div class="item-img"> </div>
<img :src="formInfo.licenseImage" alt=""> <div class="item-text row">
</div> <span>营业执照:</span>
</div> <div class="item-img">
</div> <img :src="formInfo.licenseImage" alt="">
</div>
<div class="detail-title row align-c"> </div>
<span>税务信息</span> </div>
</div>
<div class="detail-content"> <div class="detail-title row align-c">
<div class="item-text row align-c"> <span>税务信息</span>
<span>税务资质:</span> </div>
<span>{{formInfo.companyTaxText}}</span> <div class="detail-content">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>税务资质:</span>
<span>发票类型:</span> <span>{{formInfo.companyTaxText}}</span>
<span>{{formInfo.companyInvoiceText}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>发票类型:</span>
<span>公司名称:</span> <span>{{formInfo.companyInvoiceText}}</span>
<span>{{formInfo.companyName}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>公司名称:</span>
<span>纳税识别号:</span> <span>{{formInfo.companyName}}</span>
<span>{{formInfo.companyCode}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>纳税识别号:</span>
<span>税务登记地址:</span> <span>{{formInfo.companyCode}}</span>
<span>{{formInfo.companyAddress}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>税务登记地址:</span>
<span>公司电话:</span> <span>{{formInfo.companyAddress}}</span>
<span>{{formInfo.companyPhone}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>公司电话:</span>
<span>开户行:</span> <span>{{formInfo.companyPhone}}</span>
<span>{{formInfo.bankName}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>开户行:</span>
<span>银行账号:</span> <span>{{formInfo.bankName}}</span>
<span>{{formInfo.bankAccount}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>银行账号:</span>
<span>{{formInfo.bankAccount}}</span>
<div class="detail-title row align-c"> </div>
<span>联系人信息</span>
</div> <div class="item-text row align-c">
<div class="detail-content"> <span>寄送方式:</span>
<div class="item-text row align-c"> <span>{{formInfo.receiveType === '0' ? '寄送' : '自取'}}</span>
<span>联系人姓名:</span> </div>
<span>{{formInfo.corporationName}}</span> <template v-if="formInfo.receiveType === '0'">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>收件人:</span>
<span>联系人身份证:</span> <span>{{formInfo.receiveContactor}}</span>
<span>{{formInfo.corporationIdcard}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>收件人电话:</span>
<span>联系人手机号:</span> <span>{{formInfo.receiveMobile}}</span>
<span>{{formInfo.corporationPhone}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>收件地址:</span>
</div> <span>{{formInfo.receiveArea + formInfo.receiveAddress}}</span>
</div> </div>
</template> </template>
</div>
<script>
// 工具 <div class="detail-title row align-c">
import iHost from '@/common/js/host.js' <span>联系人信息</span>
import iRequest from '@/common/js/request/request.js' </div>
<div class="detail-content">
import iCurrencyMap from '@/components/currency-map.vue' <div class="item-text row align-c">
<span>联系人姓名:</span>
export default { <span>{{formInfo.corporationName}}</span>
components: { </div>
currencyMap: iCurrencyMap, <div class="item-text row align-c">
}, <span>联系人身份证:</span>
<span>{{formInfo.corporationIdcard}}</span>
data: function () { </div>
return { <div class="item-text row align-c">
formInfo: { <span>联系人手机号:</span>
companyName: '', // 名称 <span>{{formInfo.corporationPhone}}</span>
companyShortName: '', // 简称 </div>
companyCode: '', // 统一社会信用代码 </div>
companyAddress: '', // 地址 </div>
email: '', // 邮箱 </div>
licenseImage: '', // 营业执照 </template>
quoteImage: '', // 竞价承诺书
isQuote: '', <script>
// 工具
companyTax: '', // 税务资质 import iHost from '@/common/js/host.js'
companyInvoice: [], // 发票类型 import iRequest from '@/common/js/request/request.js'
companyPhone: '', // 公司电话
bankName: '', // 开户银行 import iCurrencyMap from '@/components/currency-map.vue'
bankAccount: '', // 银行账号
export default {
corporationName: '', // 联系人 components: {
corporationIdcard: '', // 联系人身份证 currencyMap: iCurrencyMap,
corporationPhone: '', // 联系手机 },
},
} data: function () {
}, return {
formInfo: {
created: function () { companyName: '', // 名称
this.reset() companyShortName: '', // 简称
this.init() companyCode: '', // 统一社会信用代码
}, companyAddress: '', // 地址
email: '', // 邮箱
methods: { licenseImage: '', // 营业执照
init: function () { quoteImage: '', // 竞价承诺书
iRequest.request(iHost.base + 'bid/zUserCompany/getUserInfo', {}, 'json', 'get') isQuote: '',
.then((funcResponse) => {
// 每次查询更新用户缓存信息 companyTax: '', // 税务资质
let funcInfo = this.$store.state.info companyInvoice: '0', // 发票类型
funcInfo.register = Number(funcResponse.registerState) companyPhone: '', // 公司电话
this.$store.commit('info', funcInfo) bankName: '', // 开户银行
localStorage.setItem('info', JSON.stringify(funcInfo)) bankAccount: '', // 银行账号
this.formInfo = {
'companyName': funcResponse.companyName, corporationName: '', // 联系人
'companyShortName': funcResponse.shortName, corporationIdcard: '', // 联系人身份证
'companyCode': funcResponse.companyCode, corporationPhone: '', // 联系手机
'companyAddress': funcResponse.address, },
'email': funcResponse.email, }
'licenseImage': funcResponse.license, },
'quoteFile': funcResponse.bidStatement ? funcResponse.bidStatement.substring(funcResponse.bidStatement.lastIndexOf('/') + 1, funcResponse.bidStatement.length) : '',
'quoteImage': funcResponse.bidStatement, created: function () {
'isQuote': funcResponse.isJoinBid, this.reset()
this.init()
'companyTax': Number(funcResponse.taxType), },
'companyInvoice': funcResponse.invoiceType.split(','),
'companyPhone': funcResponse.phone, methods: {
'bankName': funcResponse.openBank, init: function () {
'bankAccount': funcResponse.bankAccount, iRequest.request(iHost.base + 'bid/zUserCompany/getUserInfo', {}, 'json', 'get')
.then((funcResponse) => {
'corporationName': funcResponse.contactName, // 每次查询更新用户缓存信息
'corporationIdcard': funcResponse.idcard, let funcInfo = this.$store.state.info
'corporationPhone': funcResponse.mobile, funcInfo.register = Number(funcResponse.registerState)
this.$store.commit('info', funcInfo)
'timeExamine': funcResponse.auditCreatDate, localStorage.setItem('info', JSON.stringify(funcInfo))
'timeExaminePass': funcResponse.auditTime,
'timeExamineSubmit': funcResponse.auditCreatDate, this.formInfo = {
'examineState': Number(funcResponse.auditState), 'companyName': funcResponse.companyName,
'examineReason': funcResponse.reason, 'companyShortName': funcResponse.shortName,
} 'companyCode': funcResponse.companyCode,
'companyAddress': funcResponse.address,
console.log(this.formInfo) 'email': funcResponse.email,
'licenseImage': funcResponse.license,
switch(this.formInfo.companyTax) { 'quoteFile': funcResponse.bidStatement ? funcResponse.bidStatement.substring(funcResponse.bidStatement.lastIndexOf('/') + 1, funcResponse.bidStatement.length) : '',
case 0: 'quoteImage': funcResponse.bidStatement,
this.formInfo.companyTaxText = '一般纳税人' 'isQuote': funcResponse.isJoinBid,
break
'companyTax': Number(funcResponse.taxType),
case 1: 'companyInvoice': '0',
this.formInfo.companyTaxText = '小规模纳税人' 'companyPhone': funcResponse.phone,
break 'bankName': funcResponse.openBank,
'bankAccount': funcResponse.bankAccount,
case 2: 'receiveType': funcResponse.receiveType ? funcResponse.receiveType : '1',
this.formInfo.companyTaxText = '非增值税纳税人' 'receiveContactor': funcResponse.receiveContactor ? funcResponse.receiveContactor : '',
break 'receiveMobile': funcResponse.receiveMobile ? funcResponse.receiveMobile : '',
} 'receiveArea': [],
'receiveAddress': funcResponse.receiveAddress ? funcResponse.receiveAddress : '',
// 设置税务类型
for (let i = 0, len = this.formInfo.companyInvoice.length; i < len; i++) { 'corporationName': funcResponse.contactName,
switch (Number(this.formInfo.companyInvoice[i])) { 'corporationIdcard': funcResponse.idcard,
case 0: 'corporationPhone': funcResponse.mobile,
this.formInfo.companyInvoice[i] = '增值税专票'
break 'timeExamine': funcResponse.auditCreatDate,
'timeExaminePass': funcResponse.auditTime,
case 1: 'timeExamineSubmit': funcResponse.auditCreatDate,
this.formInfo.companyInvoice[i] = '增值税普票' 'examineState': Number(funcResponse.auditState),
break 'examineReason': funcResponse.reason,
}
case 2:
this.formInfo.companyInvoice[i] = '其他类型' // 判断地址数据类型,同时兼容字符串与数组类型
break if (Object.prototype.toString.call(funcResponse.receiveArea) === '[object String]') {
} this.formInfo.receiveArea = JSON.parse(funcResponse.receiveArea).join(' ')
} } else {
this.formInfo.companyInvoiceText = this.formInfo.companyInvoice.join(',') this.formInfo.receiveArea = funcResponse.receiveArea.join(' ')
}) }
.catch((funcError) => {
this.$message.error(funcError.message) console.log(this.formInfo)
})
}, switch(this.formInfo.companyTax) {
reset: function () { case 0:
this.formInfo = { this.formInfo.companyTaxText = '一般纳税人'
companyName: '', // 名称 break
companyShortName: '', // 简称
companyCode: '', // 统一社会信用代码 case 1:
companyAddress: '', // 地址 this.formInfo.companyTaxText = '小规模纳税人'
email: '', // 邮箱 break
licenseImage: '', // 营业执照
case 2:
companyTax: '', // 税务资质 this.formInfo.companyTaxText = '非增值税纳税人'
companyInvoice: [], // 发票类型 break
companyPhone: '', // 公司电话 }
bankName: '', // 开户银行 this.formInfo.companyInvoiceText = '增值税普票'
bankAccount: '', // 银行账号 })
.catch((funcError) => {
corporationName: '', // 联系人 this.$message.error(funcError.message)
corporationIdcard: '', // 联系人身份证 })
corporationPhone: '', // 联系手机 },
} reset: function () {
}, this.formInfo = {
companyName: '', // 名称
/** companyShortName: '', // 简称
* 下载竞价承诺书 companyCode: '', // 统一社会信用代码
* @function companyAddress: '', // 地址
* @param {object} funcFile email: '', // 邮箱
* @returns licenseImage: '', // 营业执照
*/
onUploadDownloadFile: function () { companyTax: '', // 税务资质
let funcFile = this.formInfo.quoteFile companyInvoice: '0', // 发票类型
let funcFileUrl = this.formInfo.quoteImage companyPhone: '', // 公司电话
new Promise(function (funcResolve, funcReject) { bankName: '', // 开户银行
let funcXMLHttpRequest = new XMLHttpRequest() bankAccount: '', // 银行账号
funcXMLHttpRequest.open('get', funcFileUrl, true)
funcXMLHttpRequest.responseType = 'blob' corporationName: '', // 联系人
funcXMLHttpRequest.send() corporationIdcard: '', // 联系人身份证
funcXMLHttpRequest.onreadystatechange = function () { corporationPhone: '', // 联系手机
if (funcXMLHttpRequest.readyState !== 4) { }
return },
}
let funStatus = funcXMLHttpRequest.status /**
if ((funStatus >= 200 && funStatus < 300) || funStatus === 304) { * 下载竞价承诺书
let funcBlob = new Blob([funcXMLHttpRequest.response]) * @function
* @param {object} funcFile
if (window.navigator.msSaveBlob) { * @returns
window.navigator.msSaveBlob(funcBlob, funcFile) */
} else { onUploadDownloadFile: function () {
let funcDownloadLink = document.createElement('a') let funcFile = this.formInfo.quoteFile
funcDownloadLink.download = funcFile let funcFileUrl = this.formInfo.quoteImage
funcDownloadLink.href = URL.createObjectURL(funcBlob) new Promise(function (funcResolve, funcReject) {
document.body.appendChild(funcDownloadLink) let funcXMLHttpRequest = new XMLHttpRequest()
funcDownloadLink.click() funcXMLHttpRequest.open('get', funcFileUrl, true)
document.body.removeChild(funcDownloadLink) funcXMLHttpRequest.responseType = 'blob'
} funcXMLHttpRequest.send()
} funcXMLHttpRequest.onreadystatechange = function () {
} if (funcXMLHttpRequest.readyState !== 4) {
}) return
}, }
onChange: function () { let funStatus = funcXMLHttpRequest.status
this.$router.push('/supplier/infochange') if ((funStatus >= 200 && funStatus < 300) || funStatus === 304) {
}, let funcBlob = new Blob([funcXMLHttpRequest.response])
onChangeRecord: function () {
this.$router.push('/supplier/inforecord') if (window.navigator.msSaveBlob) {
} window.navigator.msSaveBlob(funcBlob, funcFile)
} } else {
} let funcDownloadLink = document.createElement('a')
</script> funcDownloadLink.download = funcFile
funcDownloadLink.href = URL.createObjectURL(funcBlob)
<style lang="less"> document.body.appendChild(funcDownloadLink)
.supplier-info { funcDownloadLink.click()
width: 100%; document.body.removeChild(funcDownloadLink)
}
.supplier-map { }
height: 66px; }
border-bottom: 1px #EFEFEF solid; })
} },
onChange: function () {
.supplier-examine { this.$router.push('/supplier/infochange')
margin-top: 20px; },
span:nth-child(1) { onChangeRecord: function () {
font-size: @fontSize09; this.$router.push('/supplier/inforecord')
} }
}
span:nth-child(2) { }
color: @colorGrey40; </script>
font-size: @fontSize01;
} <style lang="less">
.supplier-info {
.state-ongoing { width: 100%;
color: #2575FA;
} .supplier-map {
height: 66px;
.state-pass { border-bottom: 1px #EFEFEF solid;
color: #49BA39; }
}
.supplier-examine {
.state-refuse { margin-top: 20px;
color: #CF2F1E; span:nth-child(1) {
} font-size: @fontSize09;
} }
.supplier-operation { span:nth-child(2) {
height: 40px; color: @colorGrey40;
margin-top: 24px; font-size: @fontSize01;
}
button {
width: 106px; .state-ongoing {
height: 36px; color: #2575FA;
margin-right: 12px; }
border:1px solid @colorBlue;
border-radius: 18px; .state-pass {
color: @colorBlue; color: #49BA39;
background: #FFFFFF; }
font-size: @fontSize02;
} .state-refuse {
} color: #CF2F1E;
}
.supplier-set { }
width: 100%;
.supplier-operation {
.detail-title { height: 40px;
width: 100%; margin-top: 24px;
height: 50px;
margin-top: 24px; button {
border-bottom: 1px #F2F2F2 solid; width: 106px;
height: 36px;
span { margin-right: 12px;
font-size: @fontSize04; border:1px solid @colorBlue;
} border-radius: 18px;
} color: @colorBlue;
background: #FFFFFF;
.detail-title:before{ font-size: @fontSize02;
content: ''; }
display: inline-block; }
width: 4px;
height: 20px; .supplier-set {
margin-right: 10px; width: 100%;
overflow: hidden;
background-image: linear-gradient(#CF2F1E 20%, #00468C 20%, #00468C 100%); .detail-title {
} width: 100%;
height: 50px;
.detail-content { margin-top: 24px;
min-width: 900px; border-bottom: 1px #F2F2F2 solid;
margin: 20px 0;
.item-text { span {
max-height: 146px; font-size: @fontSize04;
> span:nth-child(1) { }
min-width: 160px; }
margin: 6px 16px 6px 0;
text-align: right; .detail-title:before{
font-size: @fontSize02; content: '';
} display: inline-block;
width: 4px;
> span:nth-child(2) { height: 20px;
margin: 6px 0; margin-right: 10px;
font-size: @fontSize01; overflow: hidden;
} background-image: linear-gradient(#CF2F1E 20%, #00468C 20%, #00468C 100%);
}
img {
width: 100%; .detail-content {
max-width: 200px; min-width: 900px;
padding-top: 10px margin: 20px 0;
} .item-text {
} max-height: 146px;
> span:nth-child(1) {
.item-img { min-width: 160px;
width: 146px; margin: 6px 16px 6px 0;
height: 146px; text-align: right;
margin-right: 8px; font-size: @fontSize02;
} }
img { > span:nth-child(2) {
max-width: 100%; margin: 6px 0;
max-height: 100%; font-size: @fontSize01;
object-fit: contain; }
}
} img {
} width: 100%;
} max-width: 200px;
padding-top: 10px
}
}
.item-img {
width: 146px;
height: 146px;
margin-right: 8px;
}
img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
}
}
}
</style> </style>
\ No newline at end of file
...@@ -200,6 +200,10 @@ ...@@ -200,6 +200,10 @@
</el-dialog> </el-dialog>
<el-dialog title="报价记录" :visible.sync="winQuoteRecord" :lock-scroll="false" width="1000px" :close-on-click-modal="false"> <el-dialog title="报价记录" :visible.sync="winQuoteRecord" :lock-scroll="false" width="1000px" :close-on-click-modal="false">
<div v-if="quoteRecord.length === 0">
<span>暂无报价</span>
</div>
<!-- 附属合同样式 --> <!-- 附属合同样式 -->
<div v-if="quoteRecordHaveChild" class="col"> <div v-if="quoteRecordHaveChild" class="col">
<div v-for="(item, index) in quoteRecord" :key="index" class="col"> <div v-for="(item, index) in quoteRecord" :key="index" class="col">
......
<template> <template>
<!-- 我的订单 - 订单详情 --> <!-- 我的订单 - 订单详情 -->
<div class="supplier-notice-detail"> <div class="supplier-notice-detail">
<!-- 页面地图 --> <!-- 页面地图 -->
<div class="detail-map row align-c"> <div class="detail-map row align-c">
<currencyMap :customPath="[{ text: '我的订单', redirect: '/supplier/orders' }, { text: '订单详情', redirect: null }]"></currencyMap> <currencyMap :customPath="[{ text: '我的订单', redirect: '/supplier/orders' }, { text: '订单详情', redirect: null }]"></currencyMap>
</div> </div>
<!-- 项目进度 - 采购 --> <!-- 项目进度 - 采购 -->
<div v-if="!componentOrder.isMakeBill && componentOrder.paymentAmount !== 0" class="detail-operation"> <!-- 升级成自动开票功能,暂时隐藏 -->
<button @click="onOpenBill()">申请开票</button> <!--
</div> <div v-if="!componentOrder.isMakeBill && componentOrder.paymentAmount !== 0" class="detail-operation">
<button @click="onOpenBill()">申请开票</button>
<div class="detail-block"> </div>
<!-- 订单金额为零样式 --> -->
<div v-if="componentOrder.paymentAmount === 0" class="detail-content">
<div class="item-text row align-c"> <div class="detail-block">
<span>订单号:</span> <!-- 订单金额为零样式 -->
<span>{{componentOrder.ordersNumber}}</span> <div v-if="componentOrder.paymentAmount === 0" class="detail-content">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>订单号:</span>
<span>订单金额:</span> <span>{{componentOrder.ordersNumber}}</span>
<span>{{componentOrder.paymentAmount + ' 元'}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>订单金额:</span>
<span>收款方:</span> <span>{{componentOrder.paymentAmount + ' 元'}}</span>
<span>{{componentOrder.paymentCompany}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>收款方:</span>
<span>费用类型:</span> <span>{{componentOrder.paymentCompany}}</span>
<span>{{componentOrder.paymentType}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>费用类型:</span>
<span>{{componentOrder.paymentType}}</span>
<!-- 订单金额非零样式 --> </div>
<div v-if="componentOrder.paymentAmount !== 0" class="detail-content"> </div>
<div class="item-text row align-c">
<span>订单号:</span> <!-- 订单金额非零样式 -->
<span>{{componentOrder.ordersNumber}}</span> <div v-if="componentOrder.paymentAmount !== 0" class="detail-content">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>订单号:</span>
<span>订单金额:</span> <span>{{componentOrder.ordersNumber}}</span>
<span>{{componentOrder.paymentAmount + ' 元'}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>订单金额:</span>
<span>交易单号:</span> <span>{{componentOrder.paymentAmount + ' 元'}}</span>
<span>{{componentOrder.paymentId}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>交易单号:</span>
<span>支付方式:</span> <span>{{componentOrder.paymentId}}</span>
<span>{{componentOrder.paymentWay}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>支付方式:</span>
<span>支付时间:</span> <span>{{componentOrder.paymentWay}}</span>
<span>{{componentOrder.paymentTime}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>支付时间:</span>
<span>收款方:</span> <span>{{componentOrder.paymentTime}}</span>
<span>{{componentOrder.paymentCompany}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>收款方:</span>
<span>费用类型:</span> <span>{{componentOrder.paymentCompany}}</span>
<span>{{componentOrder.paymentType}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>费用类型:</span>
</div> <span>{{componentOrder.paymentType}}</span>
</div>
<div class="detail-line"></div> </div>
</div>
<!-- 项目信息 -->
<div class="detail-block"> <div class="detail-line"></div>
<div class="detail-title row align-c">
<div class="row align-c"> <!-- 项目信息 -->
<span>投标项目</span> <div class="detail-block">
</div> <div class="detail-title row align-c">
</div> <div class="row align-c">
<div class="detail-content"> <span>投标项目</span>
<div class="item-text row align-c"> </div>
<span>项目编号:</span> </div>
<span>{{componentProject.projectNumber}}</span> <div class="detail-content">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>项目编号:</span>
<span>项目名称:</span> <span>{{componentProject.projectNumber}}</span>
<span>{{componentProject.projectName}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>项目名称:</span>
<span>采购方式:</span> <span>{{componentProject.projectName}}</span>
<span>{{componentProject.buyWay}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>采购方式:</span>
<span>采购单位:</span> <span>{{componentProject.buyWay}}</span>
<span>{{componentProject.buyCompany}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>采购单位:</span>
</div> <span>{{componentProject.buyCompany}}</span>
</div>
<!-- 供应信息 --> </div>
<div class="detail-block"> </div>
<div class="detail-title row align-c">
<div class="row align-c"> <!-- 供应信息 -->
<span>供应商</span> <div class="detail-block">
</div> <div class="detail-title row align-c">
</div> <div class="row align-c">
<div class="detail-content"> <span>供应商</span>
<div class="item-text row align-c"> </div>
<span>供应商名称:</span> </div>
<span>{{componentAgency.agencName}}</span> <div class="detail-content">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>供应商名称:</span>
<span>联系人:</span> <span>{{componentAgency.agencName}}</span>
<span>{{componentAgency.agencLiaison}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>联系人:</span>
<span>联系人手机号:</span> <span>{{componentAgency.agencLiaison}}</span>
<span>{{componentAgency.agencPhone}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>联系人手机号:</span>
</div> <span>{{componentAgency.agencPhone}}</span>
</div>
<!-- 费用款项 --> </div>
<div class="detail-block"> </div>
<div class="detail-title row align-c">
<div class="row align-c"> <!-- 费用款项 -->
<span>费用款项</span> <div class="detail-block">
</div> <div class="detail-title row align-c">
</div> <div class="row align-c">
<div class="detail-content"> <span>费用款项</span>
<div v-if="componentProject.isPackage" class="item-text row"> </div>
<span>文件售价:</span> </div>
<el-table v-if="tableShow" :data="componentContract" stripe :header-cell-style="tableHeaderStyle"> <div class="detail-content">
<el-table-column type="index" label="合同包" align="center" :width="tableWidth[0]"></el-table-column> <div v-if="componentProject.isPackage" class="item-text row">
<el-table-column prop="number" label="合同包编号" :width="tableWidth[1]"></el-table-column> <span>文件售价:</span>
<el-table-column prop="object" label="标的" :width="tableWidth[2]"></el-table-column> <el-table v-if="tableShow" :data="componentContract" stripe :header-cell-style="tableHeaderStyle">
<el-table-column prop="price" label="文件售价(元)" align="center" :width="tableWidth[3]"></el-table-column> <el-table-column type="index" label="合同包" align="center" :width="tableWidth[0]"></el-table-column>
</el-table> <el-table-column prop="number" label="合同包编号" :width="tableWidth[1]"></el-table-column>
</div> <el-table-column prop="object" label="标的" :width="tableWidth[2]"></el-table-column>
<div v-if="!componentProject.isPackage" class="item-text row align-c"> <el-table-column prop="price" label="文件售价(元)" align="center" :width="tableWidth[3]"></el-table-column>
<span>文件售价:</span> </el-table>
<span>{{componentContract[0] ? componentContract[0].price : '' + ' 元'}}</span> </div>
</div> <div v-if="!componentProject.isPackage" class="item-text row align-c">
<div class="item-text row align-c"> <span>文件售价:</span>
<span>支付类别:</span> <span>{{componentContract[0] ? componentContract[0].price : '' + ' 元'}}</span>
<span>线上支付</span> </div>
</div> <div class="item-text row align-c">
</div> <span>支付类别:</span>
</div> <span>线上支付</span>
</div>
<div class="detail-line"></div> </div>
</div>
<!-- 寄送地址 -->
<div v-if="isReceive" class="detail-block"> <div class="detail-line"></div>
<div class="detail-title detail-title-white row align-c">
<div class="row align-c"> <!-- 寄送地址 -->
<span>寄送地址</span> <div v-if="isReceive" class="detail-block">
</div> <div class="detail-title detail-title-white row align-c">
</div> <div class="row align-c">
<div class="detail-content"> <span>寄送地址</span>
<div class="item-text row align-c"> </div>
<span>收件人:</span> </div>
<span>{{componentReceive.name}}</span> <div class="detail-content">
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>收件人:</span>
<span>收件人电话:</span> <span>{{componentReceive.name}}</span>
<span>{{componentReceive.phone}}</span> </div>
</div> <div class="item-text row align-c">
<div class="item-text row align-c"> <span>收件人电话:</span>
<span>收件地址:</span> <span>{{componentReceive.phone}}</span>
<span>{{componentReceive.area + componentReceive.address}}</span> </div>
</div> <div class="item-text row align-c">
</div> <span>收件地址:</span>
</div> <span>{{componentReceive.area + componentReceive.address}}</span>
</div> </div>
</template> </div>
</div>
<script> </div>
// npm </template>
import iMiment from 'miment'
<script>
// 工具 // npm
import iHost from '@/common/js/host.js' import iMiment from 'miment'
import iRequest from '@/common/js/request/request.js'
// 工具
import iCurrencyMap from '@/components/currency-map.vue' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js'
import iElement from '@/common/js/element/repair.js'
import iCurrencyMap from '@/components/currency-map.vue'
export default {
components: { import iElement from '@/common/js/element/repair.js'
currencyMap: iCurrencyMap,
}, export default {
components: {
data: function () { currencyMap: iCurrencyMap,
return { },
onOrdersId: 0, // 订单标识
data: function () {
componentOrder: {}, // 订单信息 return {
componentProject: {}, // 项目数据 onOrdersId: 0, // 订单标识
componentContract: [], // 合同数据
componentAgency: {}, // 供应信息 componentOrder: {}, // 订单信息
componentReceive: {}, // 接收信息 componentProject: {}, // 项目数据
componentContract: [], // 合同数据
componentAgency: {}, // 供应信息
tableTotal: 0, componentReceive: {}, // 接收信息
tableSelection: [],
tableHeaderStyle: {
color: '#000000', tableTotal: 0,
background: '#F2F2F2' tableSelection: [],
}, tableHeaderStyle: {
color: '#000000',
// element-ui table 自适应宽度渲染错误修复 background: '#F2F2F2'
tableShow: true, },
tableDisableWidth: 220 + 64 + 182,
tableWidth: [0, 0, 0, 0], // element-ui table 自适应宽度渲染错误修复
tableWidthProportion: [20, 30, 25, 25], tableShow: true,
tableQuoteRecordTimer: 0, tableDisableWidth: 220 + 64 + 182,
tableWidth: [0, 0, 0, 0],
isReceive: true, tableWidthProportion: [20, 30, 25, 25],
windowChangeTimer: 0, tableQuoteRecordTimer: 0,
}
}, isReceive: true,
windowChangeTimer: 0,
watch:{ }
$route: function () { },
this.initKey()
this.ordersDetail(this.onOrdersId) watch:{
iElement.tableRender(this, window.innerWidth - this.tableDisableWidth, this.tableWidth, this.tableWidthProportion) $route: function () {
} this.initKey()
}, this.ordersDetail(this.onOrdersId)
iElement.tableRender(this, window.innerWidth - this.tableDisableWidth, this.tableWidth, this.tableWidthProportion)
created: function () { }
this.initKey() },
this.ordersDetail(this.onOrdersId)
iElement.tableRender(this, window.innerWidth - this.tableDisableWidth, this.tableWidth, this.tableWidthProportion) created: function () {
}, this.initKey()
this.ordersDetail(this.onOrdersId)
mounted: function () { iElement.tableRender(this, window.innerWidth - this.tableDisableWidth, this.tableWidth, this.tableWidthProportion)
window.onresize = () => { },
this.tableShow = false
this.windowChangeTimer = setTimeout(() => { mounted: function () {
iElement.tableRender(this, window.innerWidth - this.tableDisableWidth, this.tableWidth, this.tableWidthProportion) window.onresize = () => {
clearTimeout(this.windowChangeTimer) this.tableShow = false
}, 10) this.windowChangeTimer = setTimeout(() => {
} iElement.tableRender(this, window.innerWidth - this.tableDisableWidth, this.tableWidth, this.tableWidthProportion)
}, clearTimeout(this.windowChangeTimer)
}, 10)
methods: { }
initKey: function () { },
this.onOrdersId = this.$route.query.id
}, methods: {
initKey: function () {
ordersDetail: function (funcOrdersId) { this.onOrdersId = this.$route.query.id
iRequest.request(iHost.base + 'bid/order/getCompanyOrderDetail', { 'orderId': this.onOrdersId } , 'json', 'post') },
.then((funcResponse) => {
this.componentOrder = { ordersDetail: function (funcOrdersId) {
'ordersId': funcResponse.order.orderId, iRequest.request(iHost.base + 'bid/order/getCompanyOrderDetail', { 'orderId': this.onOrdersId } , 'json', 'post')
'ordersNumber': funcResponse.order.sn, .then((funcResponse) => {
'paymentType': funcResponse.order.feeType, this.componentOrder = {
'paymentAmount': funcResponse.order.amount, 'ordersId': funcResponse.order.orderId,
'paymentCompany': funcResponse.order.payee, 'ordersNumber': funcResponse.order.sn,
'paymentId': funcResponse.order.payId, 'paymentType': funcResponse.order.feeType,
'paymentWay': funcResponse.order.payType, 'paymentAmount': funcResponse.order.amount,
'paymentTime': iMiment(funcResponse.order.payTime).format('YYYY-MM-DD hh:mm:ss'), 'paymentCompany': funcResponse.order.payee,
'isMakeBill': funcResponse.order.billingState === '0' ? false : true, 'paymentId': funcResponse.order.payId,
} 'paymentWay': funcResponse.order.payType,
'paymentTime': iMiment(funcResponse.order.payTime).format('YYYY-MM-DD hh:mm:ss'),
this.componentProject = { 'isMakeBill': funcResponse.order.billingState === '0' ? false : true,
'projectId': funcResponse.project.tenderProjectId, }
'projectName': funcResponse.project.projectName,
'projectNumber': funcResponse.project.projectNo, this.componentProject = {
'buyWay': funcResponse.project.procurementType, 'projectId': funcResponse.project.tenderProjectId,
'buyCompany': funcResponse.project.company, 'projectName': funcResponse.project.projectName,
'isPackage': funcResponse.order.containPackage === '0' ? false : true, 'projectNumber': funcResponse.project.projectNo,
} 'buyWay': funcResponse.project.procurementType,
'buyCompany': funcResponse.project.company,
this.componentAgency = { 'isPackage': funcResponse.order.containPackage === '0' ? false : true,
'agencName': funcResponse.company.companyName, }
'agencPhone': funcResponse.company.mobile,
'agencLiaison': funcResponse.company.contactName, this.componentAgency = {
} 'agencName': funcResponse.company.companyName,
'agencPhone': funcResponse.company.mobile,
if (funcResponse.orderBilling.name) { 'agencLiaison': funcResponse.company.contactName,
this.isReceive = true }
this.componentReceive = {
'name': funcResponse.orderBilling.name, if (funcResponse.orderBilling.name) {
'phone': funcResponse.orderBilling.phone, this.isReceive = true
'area': funcResponse.orderBilling.area.replace(/\//g, ''), this.componentReceive = {
'address': funcResponse.orderBilling.address, 'name': funcResponse.orderBilling.name,
} 'phone': funcResponse.orderBilling.phone,
} else { 'area': '',
this.isReceive = false 'address': funcResponse.orderBilling.address,
} }
if (this.componentProject.isPackage) { // 判断地址数据类型,同时兼容字符串与数组类型
// 多个合同 if (Object.prototype.toString.call(funcResponse.orderBilling.area) === '[object String]') {
let funcRawData = funcResponse.order.tenderPackages this.componentReceive.area = JSON.parse(funcResponse.orderBilling.area).join(' ')
for (let i = 0, len = funcRawData.length; i < len; i++) { } else {
let funcItem = { this.componentReceive.area = funcResponse.orderBilling.area.join(' ')
'index': i + 1, }
'number': funcRawData[i].no, } else {
'object': funcRawData[i].name, this.isReceive = false
'price': funcRawData[i].price, }
}
this.componentContract.push(funcItem) if (this.componentProject.isPackage) {
} // 多个合同
} else { let funcRawData = funcResponse.order.tenderPackages
this.componentContract.push({ 'price': funcResponse.order.price }) for (let i = 0, len = funcRawData.length; i < len; i++) {
} let funcItem = {
}) 'index': i + 1,
.catch((funcError) => {}) 'number': funcRawData[i].no,
}, 'object': funcRawData[i].name,
'price': funcRawData[i].price,
onOpenBill: function () { }
this.$router.push('/supplier/ordersbills?id=' + this.componentOrder.ordersId) this.componentContract.push(funcItem)
}, }
} } else {
} this.componentContract.push({ 'price': funcResponse.order.price })
</script> }
})
<style lang="less"> .catch((funcError) => {})
.supplier-notice-detail { },
width: 100%;
onOpenBill: function () {
.detail-map { this.$router.push('/supplier/ordersbills?id=' + this.componentOrder.ordersId)
height: 66px; },
border-bottom: 1px #EFEFEF solid; }
} }
</script>
.detail-operation {
height: 40px; <style lang="less">
margin-top: 24px; .supplier-notice-detail {
width: 100%;
button {
width: 106px; .detail-map {
height: 36px; height: 66px;
margin-left: 12px; border-bottom: 1px #EFEFEF solid;
border:1px solid @colorBlue; }
border-radius: 18px;
color: @colorBlue; .detail-operation {
background: #FFFFFF; height: 40px;
font-size: @fontSize02; margin-top: 24px;
}
} button {
width: 106px;
.detail-line { height: 36px;
height: 1px; margin-left: 12px;
margin-bottom: 20px; border:1px solid @colorBlue;
border-bottom: 1px #EFEFEF solid; border-radius: 18px;
} color: @colorBlue;
background: #FFFFFF;
.detail-block { font-size: @fontSize02;
.detail-title { }
width: 100%; }
> div { .detail-line {
width: 100%; height: 1px;
height: 40px; margin-bottom: 20px;
padding: 0 12px; border-bottom: 1px #EFEFEF solid;
background: #F2F2F2; }
}
.detail-block {
span { .detail-title {
font-weight: 800; width: 100%;
font-size: @fontSize01;
} > div {
} width: 100%;
height: 40px;
.detail-title-white { padding: 0 12px;
> div { background: #F2F2F2;
background: #FFFFFF; }
}
} span {
font-weight: 800;
.detail-content { font-size: @fontSize01;
margin: 30px 0; }
.item-text { }
> span:nth-child(1) {
min-width: 150px; .detail-title-white {
margin: 6px 16px 6px 0; > div {
text-align: right; background: #FFFFFF;
font-size: @fontSize02; }
font-weight: 800; }
}
.detail-content {
> span:nth-child(2) { margin: 30px 0;
margin: 6px 0; .item-text {
font-size: @fontSize01; > span:nth-child(1) {
} min-width: 150px;
} margin: 6px 16px 6px 0;
} text-align: right;
} font-size: @fontSize02;
} font-weight: 800;
}
> span:nth-child(2) {
margin: 6px 0;
font-size: @fontSize01;
}
}
}
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 我的订单 - 订单列表 --> <!-- 我的订单 - 订单列表 -->
<div class="personal-orders col"> <div class="personal-orders col">
<div class="map row align-c"> <div class="map row align-c">
<currencyMap :customPath="[{ text: '我的订单', redirect: null }]"></currencyMap> <currencyMap :customPath="[{ text: '我的订单', redirect: null }]"></currencyMap>
</div> </div>
<div class="limit row"> <div class="limit row">
<div class="limit-option"> <div class="limit-option">
<el-input v-model="limitKeyWord" placeholder="请输入要检索的订单号/项目名称/项目编号"></el-input> <el-input v-model="limitKeyWord" placeholder="请输入要检索的订单号/项目名称/项目编号"></el-input>
</div> </div>
<div class="limit-option"> <div class="limit-option">
<el-select v-model="limitOrdersState" placeholder="费用类型"> <el-select v-model="limitOrdersState" placeholder="费用类型">
<el-option label="支付成功" value="1"></el-option> <el-option label="支付成功" value="1"></el-option>
<el-option label="暂未支付" value="2"></el-option> <el-option label="暂未支付" value="2"></el-option>
</el-select> </el-select>
</div> </div>
<div class="limit-operation"> <div class="limit-operation">
<button class="global-cursor" @click="queryList()">查询</button> <button class="global-cursor" @click="queryList()">查询</button>
<button class="global-cursor" @click="resetQueryList()">重置</button> <button class="global-cursor" @click="resetQueryList()">重置</button>
</div> </div>
</div> </div>
<!-- 列表 --> <!-- 列表 -->
<div class="list"> <div class="list">
<el-table v-if="tableShow" :data="ordersList" stripe :header-cell-style="tableHeaderStyle"> <el-table v-if="tableShow" :data="ordersList" stripe :header-cell-style="tableHeaderStyle">
<el-table-column prop="ordersNumber" label="订单号" min-width="100"></el-table-column> <el-table-column prop="ordersNumber" label="订单号" min-width="100"></el-table-column>
<el-table-column prop="projectNumber" label="项目编号"></el-table-column> <el-table-column prop="projectNumber" label="项目编号"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="type" label="费用类型" align="center"></el-table-column> <el-table-column prop="type" label="费用类型" align="center"></el-table-column>
<el-table-column prop="paymentAmount" label="支付金额" align="center"></el-table-column> <el-table-column prop="paymentAmount" label="支付金额" align="center"></el-table-column>
<el-table-column label="操作" min-width="100" align="center"> <el-table-column label="操作" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="global-cursor list-operation row con-c"> <div class="global-cursor list-operation row con-c">
<span @click="onOrdersDetail(scope.row)">查看</span> <span @click="onOrdersDetail(scope.row)">查看</span>
<span v-if="!scope.row.isMakeBill && scope.row.paymentAmount !== 0" class="global-color-blue" @click="onOrdersBill(scope.row)">申请开票</span> <!-- 升级成自动开票功能,暂时隐藏 -->
</div> <!-- <span v-if="!scope.row.isMakeBill && scope.row.paymentAmount !== 0" class="global-color-blue" @click="onOrdersBill(scope.row)">申请开票</span> -->
</template> </div>
</el-table-column> </template>
</el-table> </el-table-column>
</div> </el-table>
</div>
<!-- 列表分页 -->
<div class="pagination row"> <!-- 列表分页 -->
<el-pagination :total="pagination.total" layout="total, sizes, prev, pager, next, jumper" @size-change="(size) => {onPagination(size, 'size', pagination)}" @current-change="(size) => {onPagination(size, 'current', pagination)}"></el-pagination> <div class="pagination row">
<button>确定</button> <el-pagination :total="pagination.total" layout="total, sizes, prev, pager, next, jumper" @size-change="(size) => {onPagination(size, 'size', pagination)}" @current-change="(size) => {onPagination(size, 'current', pagination)}"></el-pagination>
</div> <button>确定</button>
</div> </div>
</template> </div>
</template>
<script>
import iMiment from 'miment' <script>
import iMiment from 'miment'
import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js'
import iCurrencyMap from '@/components/currency-map.vue'
import iFramePagination from '@/common/frame/pagination/pagination.js' import iCurrencyMap from '@/components/currency-map.vue'
import iFramePagination from '@/common/frame/pagination/pagination.js'
export default {
components: { export default {
currencyMap: iCurrencyMap, components: {
}, currencyMap: iCurrencyMap,
},
data: function () {
return { data: function () {
limitKeyWord: '', return {
limitOrdersState: '', limitKeyWord: '',
limitOrdersState: '',
tableHeaderStyle: {
color: '#000000', tableHeaderStyle: {
background: '#F2F2F2' color: '#000000',
}, background: '#F2F2F2'
ordersList: [], },
ordersList: [],
// element-ui table 自适应宽度渲染错误修复
tableShow: false, // element-ui table 自适应宽度渲染错误修复
tableWidth: [0, 0, 0, 0, 0], tableShow: false,
tableWidthPercentage: [20, 20, 20, 20, 20], tableWidth: [0, 0, 0, 0, 0],
tableQuoteRecordTimer: 0, tableWidthPercentage: [20, 20, 20, 20, 20],
tableQuoteRecordTimer: 0,
quoteRecordActive: -1,
quoteRecordList: [], quoteRecordActive: -1,
quoteRecordList: [],
pagination: {
size: 10, pagination: {
total: 0, size: 10,
current: 1, total: 0,
} current: 1,
} }
}, }
},
watch: {
watch: {
},
},
created: function () {
this.queryList() created: function () {
this.tableRender() this.queryList()
}, this.tableRender()
},
mounted: function () {
window.onresize = () => { mounted: function () {
this.tableShow = false window.onresize = () => {
this.windowChangeTimer = setTimeout(() => { this.tableShow = false
this.tableRender() this.windowChangeTimer = setTimeout(() => {
clearTimeout(this.windowChangeTimer) this.tableRender()
}, 10) clearTimeout(this.windowChangeTimer)
} }, 10)
}, }
},
methods: {
/** methods: {
* 重新渲染表格 /**
* 修复 element-ui table 不会跟随屏幕宽度自适应的问题 * 重新渲染表格
* @function * 修复 element-ui table 不会跟随屏幕宽度自适应的问题
* @returns * @function
*/ * @returns
tableRender: function () { */
let funcWidth = 0 tableRender: function () {
if (document.body.clientHeight > document.documentElement.clientHeight) { let funcWidth = 0
// 屏幕宽度 - 滚动条宽度 - 菜单宽度 - 缩进宽度 if (document.body.clientHeight > document.documentElement.clientHeight) {
funcWidth = (window.innerWidth - 220 - 64) / 100 // 屏幕宽度 - 滚动条宽度 - 菜单宽度 - 缩进宽度
} else { funcWidth = (window.innerWidth - 220 - 64) / 100
// 屏幕宽度 - 菜单宽度 - 缩进宽度 } else {
funcWidth = (window.innerWidth - 17 - 220 - 64) / 100 // 屏幕宽度 - 菜单宽度 - 缩进宽度
} funcWidth = (window.innerWidth - 17 - 220 - 64) / 100
for (let i = 0, len = this.tableWidth.length; i < len; i++) { }
this.tableWidth[i] = Math.floor(this.tableWidthPercentage[i] * funcWidth) for (let i = 0, len = this.tableWidth.length; i < len; i++) {
} this.tableWidth[i] = Math.floor(this.tableWidthPercentage[i] * funcWidth)
this.tableShow = true }
}, this.tableShow = true
},
resetQueryList: function () {
this.limitKeyWord = '' resetQueryList: function () {
this.limitOrdersState = '' this.limitKeyWord = ''
this.pagination.current = 1 this.limitOrdersState = ''
this.queryList() this.pagination.current = 1
}, this.queryList()
/** },
* 列表查询 /**
* @function * 列表查询
* @returns * @function
*/ * @returns
queryList: function () { */
let funcParam = { queryList: function () {
'keyword': this.limitKeyWord, let funcParam = {
'state': this.limitOrdersState, // 1 - 支付成功, 2 - 暂未支付 'keyword': this.limitKeyWord,
'pageSize': this.pagination.size, 'state': this.limitOrdersState, // 1 - 支付成功, 2 - 暂未支付
'pageNo': this.pagination.current 'pageSize': this.pagination.size,
} 'pageNo': this.pagination.current
}
iRequest.request(iHost.base + 'bid/order/getCompanyOrderList', funcParam, 'json', 'post')
.then((funcResponse) => { iRequest.request(iHost.base + 'bid/order/getCompanyOrderList', funcParam, 'json', 'post')
let funcList = [] .then((funcResponse) => {
let funcRawData = funcResponse.list let funcList = []
for (let i = 0, len = funcRawData.length; i < len; i++) { let funcRawData = funcResponse.list
let funcItem = { for (let i = 0, len = funcRawData.length; i < len; i++) {
'index': i, let funcItem = {
'type': funcRawData[i].feeType, 'index': i,
'ordersId': funcRawData[i].orderId, 'type': funcRawData[i].feeType,
'ordersNumber': funcRawData[i].sn, 'ordersId': funcRawData[i].orderId,
'projectName': funcRawData[i].projectName, 'ordersNumber': funcRawData[i].sn,
'projectNumber': funcRawData[i].projectNo, 'projectName': funcRawData[i].projectName,
'paymentAmount': funcRawData[i].amount, 'projectNumber': funcRawData[i].projectNo,
'isMakeBill': funcRawData[i].billingState === '0' ? false : true, 'paymentAmount': funcRawData[i].amount,
} 'isMakeBill': funcRawData[i].billingState === '0' ? false : true,
}
funcList.push(funcItem)
} funcList.push(funcItem)
}
this.ordersList = funcList
this.pagination.total = funcResponse.count this.ordersList = funcList
}) this.pagination.total = funcResponse.count
.catch((funcError) => { })
this.$message.error(funcError.message) .catch((funcError) => {
}) this.$message.error(funcError.message)
}, })
},
onOrdersBill: function (funcItem) {
this.$router.push('/supplier/ordersbills?id=' + funcItem.ordersId) onOrdersBill: function (funcItem) {
}, this.$router.push('/supplier/ordersbills?id=' + funcItem.ordersId)
},
onOrdersDetail: function (funcItem) {
this.$router.push('/supplier/ordersdetail?id=' + funcItem.ordersId) onOrdersDetail: function (funcItem) {
}, this.$router.push('/supplier/ordersdetail?id=' + funcItem.ordersId)
},
onDetail: function (funcItem, funcIsQuote) {
if (funcIsQuote) { onDetail: function (funcItem, funcIsQuote) {
this.$router.push('/supplier/detail?type=0' + '&id=' + funcItem.noticeId + '&quote=true') if (funcIsQuote) {
return this.$router.push('/supplier/detail?type=0' + '&id=' + funcItem.noticeId + '&quote=true')
} return
this.$router.push('/supplier/detail?type=0' + '&id=' + funcItem.noticeId) }
}, this.$router.push('/supplier/detail?type=0' + '&id=' + funcItem.noticeId)
},
/**
* 页码组件 /**
* @function * 页码组件
* @param {number} funcValue * @function
* @param {string} funcType - 数据类型 * @param {number} funcValue
* @param {object} funcUpdateObject - 记录对象 * @param {string} funcType - 数据类型
* @returns * @param {object} funcUpdateObject - 记录对象
*/ * @returns
onPagination: function (funcValue, funcType, funcUpdateObject) { */
iFramePagination(funcValue, funcType, funcUpdateObject) onPagination: function (funcValue, funcType, funcUpdateObject) {
this.queryList() iFramePagination(funcValue, funcType, funcUpdateObject)
}, this.queryList()
} },
} }
</script> }
</script>
<style lang="less">
.personal-orders { <style lang="less">
padding-bottom: 180px; .personal-orders {
padding-bottom: 180px;
.map {
height: 66px; .map {
border-bottom: 1px #EFEFEF solid; height: 66px;
} border-bottom: 1px #EFEFEF solid;
}
.limit {
width: 100%; .limit {
margin-top: 22px; width: 100%;
margin-top: 22px;
.limit-option {
> .el-input, .limit-option {
> .el-select { > .el-input,
width: 320px; > .el-select {
margin-right: 20px; width: 320px;
} margin-right: 20px;
}
button {
width: 120px; button {
height: 40px; width: 120px;
margin-right: 20px; height: 40px;
border: 1px solid @colorBlue; margin-right: 20px;
border-radius: 5px; border: 1px solid @colorBlue;
color: @colorBlue; border-radius: 5px;
background: #FFFFFF; color: @colorBlue;
} background: #FFFFFF;
} }
}
.limit-operation {
button { .limit-operation {
width: 70px; button {
height: 40px; width: 70px;
margin-right: 20px; height: 40px;
border-radius: 5px; margin-right: 20px;
border: none; border-radius: 5px;
} border: none;
}
button:nth-child(1) {
color: #FFFFFF; button:nth-child(1) {
background: @colorBlue; color: #FFFFFF;
} background: @colorBlue;
}
button:nth-child(2) {
color: @colorGrey20; button:nth-child(2) {
background: @colorGrey90; color: @colorGrey20;
} background: @colorGrey90;
} }
} }
}
.list {
padding-top: 20px; .list {
padding-top: 20px;
.list-operation {
.list-operation {
> span {
margin: 0 16px; > span {
color: @colorBlue; margin: 0 16px;
} color: @colorBlue;
} }
} }
}
.pagination {
margin-top: 60px; .pagination {
margin-top: 60px;
> button {
width: 70px; > button {
height: 46px; width: 70px;
color: #FFFFFF; height: 46px;
border: none; color: #FFFFFF;
font-size: @fontSize02; border: none;
background: #00468C; font-size: @fontSize02;
} background: #00468C;
} }
} }
</style> }
</style>
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div class="main global-maxwidth"> <div class="main global-maxwidth">
<!-- 全局搜索 --> <!-- 全局搜索 -->
<div class="query-key row"> <div class="query-key row">
<el-input v-model="limitKeyword" placeholder="请输入您要搜索的内容" @keyup.enter.native="queryList()"></el-input> <el-input v-model="limitKeyword" placeholder="请输入您要搜索的内容" @keyup.enter.native="onSearchContent()"></el-input>
<el-button @click="queryList()"> <el-button @click="onSearchContent()">
<span>搜  索</span> <span>搜  索</span>
</el-button> </el-button>
</div> </div>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<!-- 列表分页 --> <!-- 列表分页 -->
<div class="pagination row con-c"> <div class="pagination row con-c">
<el-pagination :total="pagination.total" layout="total, sizes, prev, pager, next, jumper" @size-change="(size) => {onPagination(size, 'size', pagination)}" @current-change="(size) => {onPagination(size, 'current', pagination)}"></el-pagination> <el-pagination :total="pagination.total" :current-page="pagination.current" layout="total, sizes, prev, pager, next, jumper" @size-change="(size) => {onPagination(size, 'size', pagination)}" @current-change="(size) => {onPagination(size, 'current', pagination)}"></el-pagination>
<button>确定</button> <button>确定</button>
</div> </div>
</div> </div>
...@@ -250,6 +250,12 @@ ...@@ -250,6 +250,12 @@
} }
}, },
onSearchContent: function () {
this.pagination.size = 10
this.pagination.current = 1
this.queryList()
},
/** /**
* 条件选择 - 标签选择 * 条件选择 - 标签选择
* @function * @function
...@@ -262,12 +268,15 @@ ...@@ -262,12 +268,15 @@
switch (funcRankIndex) { switch (funcRankIndex) {
case 0: case 0:
this.limitInformation = funcItem.value this.limitInformation = funcItem.value
this.pagination.size = 10
this.pagination.current = 1
if (funcItem.value === '') { if (funcItem.value === '') {
this.$router.push('/bid') this.$router.push('/bid')
} else { } else {
this.$router.push('/bid?type=' + funcItem.value) this.$router.push('/bid?type=' + funcItem.value)
} }
this.queryList()
break break
case 1: case 1:
...@@ -296,6 +305,8 @@ ...@@ -296,6 +305,8 @@
* @returns * @returns
*/ */
onLimitOrder: function (funcType) { onLimitOrder: function (funcType) {
this.pagination.size = 10
this.pagination.current = 1
switch (funcType) { switch (funcType) {
case 'old': case 'old':
this.limitTimeOrder = 0 this.limitTimeOrder = 0
......
...@@ -1286,36 +1286,61 @@ let output = function (thisVue, id, type, isPreview) { ...@@ -1286,36 +1286,61 @@ let output = function (thisVue, id, type, isPreview) {
} }
} }
console.log('funcProject')
console.log(funcProject)
thisVue.$store.commit('componentProject', funcProject) thisVue.$store.commit('componentProject', funcProject)
let funcRawData let funcRawData
if (funcProject.isPackage) { if (funcProject.isPackage) {
funcRawData = funcResponse.packages funcRawData = funcResponse.packages
funcRawData.sort(function(a, b) {
let funcMainWeight = 1000
a.index = a.no
b.index = b.no
// 计算 a 的索引权重
let funcIndex = a.index.toString().split('-')
let funcA = Number(funcIndex[0]) * funcMainWeight
if (funcIndex[1]) {
a.isChild = true
funcA = funcA + Number(funcIndex[1])
} else {
a.isChild = false
}
// 计算 b 的索引权重
funcIndex = b.index.toString().split('-')
let funcB = Number(funcIndex[0]) * funcMainWeight
if (funcIndex[1]) {
b.isChild = true
funcB = funcB + Number(funcIndex[1])
} else {
b.isChild = false
}
return funcA - funcB
})
for (let i = 0, len = funcRawData.length; i < len; i++) { for (let i = 0, len = funcRawData.length; i < len; i++) {
let funcItem = { let funcItem = {
'index': i + 1, // 序号 'index': funcRawData[i].index.toString(), // 序号
'id': funcRawData[i].biddingPackageId, // 标识 'id': funcRawData[i].biddingPackageId, // 标识
'object': funcRawData[i].name, // 标的 'object': funcRawData[i].name ? funcRawData[i].name : '', // 标的
'budget': funcRawData[i].fixedPrice, // 预算金额 'budget': funcRawData[i].fixedPrice, // 预算金额
'quantity': funcRawData[i].num, // 标的数量 'quantity': funcRawData[i].num, // 标的数量
'requirement': funcRawData[i].requirement, // 竞价参数要求 'requirement': funcRawData[i].requirement, // 竞价参数要求
'isChild': funcRawData[i].isChild,
} }
if (!funcItem.isChild) {
if (funcRawData[i].company) { if (funcRawData[i + 1] && funcRawData[i + 1].isChild) {
funcItem.resultName = funcRawData[i].company funcItem.haveChild = true
} else { } else {
funcItem.resultName = '流标' funcItem.haveChild = false
} }
if (funcRawData[i].price && funcRawData[i].price !== 0) {
funcItem.resultPrice = funcRawData[i].price
} else { } else {
funcItem.resultPrice = 0 funcItem.haveChild = false
} }
funcPackage.push(funcItem) funcPackage.push(funcItem)
} }
thisVue.$store.commit('componentContract', funcPackage) thisVue.$store.commit('componentContract', funcPackage)
} }
......
...@@ -119,16 +119,28 @@ ...@@ -119,16 +119,28 @@
</div> </div>
<!-- 竞价变更信息 --> <!-- 竞价变更信息 -->
<div v-if="[10].indexOf(noticeType) >= 0 && (componentProject.isChangeTime || componentProject.isChangePackage)" class="info-item"> <div v-if="[10].indexOf(noticeType) >= 0" class="info-item">
<div class="title title-decorate row align-c"> <div class="title title-decorate row align-c">
<span>变更信息</span> <span>变更信息</span>
</div> </div>
<div v-if="componentProject.isPause" class="change col">
<span>{{'是否暂停竞价:是'}}</span>
</div>
<div v-if="componentProject.isRecover" class="change col">
<span>{{'是否恢复竞价:是'}}</span>
</div>
<div v-if="componentProject.isTermination" class="change col">
<span>{{'是否终止竞价:是'}}</span>
</div>
<div v-if="componentProject.isChangeTime" class="change col"> <div v-if="componentProject.isChangeTime" class="change col">
<span>{{'更改竞价时间:' + componentProject.timeBegin + ' - ' + componentProject.timeEnd}}</span> <span>{{'更改竞价时间:' + componentProject.timeBegin + ' - ' + componentProject.timeEnd}}</span>
</div> </div>
<div v-if="componentProject.isPackage" class="change col"> <div v-if="componentProject.isChangePackage" class="change col">
<div v-if="componentContract.length > 0" class="row align-s"> <div v-if="componentContract.length > 0" class="row align-s">
<span>更改竞价标的:</span> <span>更改竞价标的:</span>
<el-table :data="componentContract" stripe :header-cell-style="tableHeaderStyle"> <el-table :data="componentContract" stripe :header-cell-style="tableHeaderStyle">
...@@ -661,6 +673,13 @@ ...@@ -661,6 +673,13 @@
return return
} }
// 供应身份但注册时未选择参与竞价不能报价
if (!this.$store.getters.info.isJoinBid) {
this.tipText = '您的注册信息尚未参与网上竞价,暂不能报价;如需报价,请您在企业信息中上传竞价承诺书,信息审核通过后,我们将为您开通报价功能。'
this.winTip = true
return
}
// 供应身份而且通过审核 // 供应身份而且通过审核
if (this.$store.getters.info.identity === 2 && this.$store.getters.info.register === 1) { if (this.$store.getters.info.identity === 2 && this.$store.getters.info.register === 1) {
this.winQuote = true this.winQuote = true
...@@ -1027,7 +1046,8 @@ ...@@ -1027,7 +1046,8 @@
} }
span:nth-child(3) { span:nth-child(3) {
min-width: 160px; display: inline-block;
min-width: 100px;
margin-right: 20px; margin-right: 20px;
} }
......
...@@ -140,11 +140,9 @@ ...@@ -140,11 +140,9 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="发票类型(可多选):" prop="companyInvoice"> <el-form-item label="发票类型(可多选):" prop="companyInvoice">
<el-checkbox-group v-model="formRegister.companyInvoice"> <el-radio-group v-model="formRegister.companyInvoice" :value="formRegister.companyInvoice">
<el-checkbox label="增值税专票"></el-checkbox> <el-radio label="0">增值税专票</el-radio>
<el-checkbox label="增值税普票"></el-checkbox> </el-radio-group>
<el-checkbox label="其他类型"></el-checkbox>
</el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="公司名称:" prop="companyName"> <el-form-item label="公司名称:" prop="companyName">
<span>{{formRegister.companyName}}</span> <span>{{formRegister.companyName}}</span>
...@@ -164,6 +162,29 @@ ...@@ -164,6 +162,29 @@
<el-form-item label="银行账户:" prop="bankAccount"> <el-form-item label="银行账户:" prop="bankAccount">
<el-input v-model="formRegister.bankAccount" maxlength="30" placeholder="请输入银行账户"></el-input> <el-input v-model="formRegister.bankAccount" maxlength="30" placeholder="请输入银行账户"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="发票领取方式:">
<el-radio-group v-model="formRegister.receiveType">
<el-radio label="0">寄送</el-radio>
<el-radio label="1">自取</el-radio>
</el-radio-group>
</el-form-item>
<template v-if="formRegister.receiveType === '0'">
<el-form-item label="收件人:" prop="receiveContactor">
<el-input v-model="formRegister.receiveContactor" maxlength="30" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="收件人电话:" prop="receiveMobile">
<el-input v-model="formRegister.receiveMobile" maxlength="20" placeholder="请输入电话"></el-input>
</el-form-item>
<el-form-item label="收件地址:" prop="receiveArea">
<currencyArea @change="onAreaChange"></currencyArea>
</el-form-item>
<el-form-item label="" prop="receiveAddress">
<el-input v-model="formRegister.receiveAddress" maxlength="100" placeholder="请输入详细地址"></el-input>
</el-form-item>
</template>
<el-form-item class="register-info-button row con-c"> <el-form-item class="register-info-button row con-c">
<el-button type="primary" @click.prevent="onPrevious()">上一步</el-button> <el-button type="primary" @click.prevent="onPrevious()">上一步</el-button>
<el-button type="primary" @click.prevent="onNext()">下一步</el-button> <el-button type="primary" @click.prevent="onNext()">下一步</el-button>
...@@ -234,10 +255,12 @@ ...@@ -234,10 +255,12 @@
import iRule from '@/common/js/rule/rule.js' import iRule from '@/common/js/rule/rule.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iCurrencyMap from '@/components/currency-map.vue' import iCurrencyMap from '@/components/currency-map.vue'
import iCurrencyArea from '@/components/currency-area.vue'
export default { export default {
components: { components: {
currencyMap: iCurrencyMap, currencyMap: iCurrencyMap,
currencyArea: iCurrencyArea,
}, },
data: function () { data: function () {
...@@ -260,10 +283,15 @@ ...@@ -260,10 +283,15 @@
// 税务信息 // 税务信息
companyTax: '', companyTax: '',
companyInvoice: [], companyInvoice: '0',
companyPhone: '', companyPhone: '',
bankName: '', bankName: '',
bankAccount: '', bankAccount: '',
receiveType: '',
receiveContactor: '',
receiveMobile: '',
receiveArea: [],
receiveAddress: '',
// 短信验证 // 短信验证
corporationName: '', corporationName: '',
...@@ -361,7 +389,7 @@ ...@@ -361,7 +389,7 @@
{ required: true, message: '请选择税务资质', trigger: 'blur' } { required: true, message: '请选择税务资质', trigger: 'blur' }
], ],
companyInvoice: [ companyInvoice: [
{ type: 'array', required: true, message: '请选择发票类型', trigger: 'change' } { required: true, message: '请选择发票类型', trigger: 'blur' }
], ],
companyPhone: [ companyPhone: [
{ required: true, message: '请输入公司电话', trigger: 'blur' }, { required: true, message: '请输入公司电话', trigger: 'blur' },
...@@ -403,6 +431,22 @@ ...@@ -403,6 +431,22 @@
{ required: true, message: '请再次输入登录密码', trigger: 'blur' }, { required: true, message: '请再次输入登录密码', trigger: 'blur' },
{ validator: (funcRule, funcValue, funcCallback) => iRule.passwordRepeat(funcRule, funcValue, funcCallback, this.formRegister.password), message: '与登录密码不一致,请重新输入', trigger: 'blur'} { validator: (funcRule, funcValue, funcCallback) => iRule.passwordRepeat(funcRule, funcValue, funcCallback, this.formRegister.password), message: '与登录密码不一致,请重新输入', trigger: 'blur'}
], ],
receiveContactor: [
{ required: true, message: '请输入收件人姓名', trigger: 'blur' },
{ validator: iRule.predefineRoutineText, message: '请正确输入姓名', trigger: 'blur'}
],
receiveMobile: [
{ required: true, message: '请输入收件人电话', trigger: 'blur' },
{ validator: iRule.fixedPhone, message: '请正确输入收件人电话', trigger: 'blur'}
],
receiveArea: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
{ validator: iRule.predefineRoutineText, trigger: 'blur'}
],
receiveAddress: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
{ validator: iRule.predefineRoutineText, trigger: 'blur'}
],
}, },
} }
}, },
...@@ -437,10 +481,15 @@ ...@@ -437,10 +481,15 @@
// 税务信息 // 税务信息
companyTax: '', companyTax: '',
companyInvoice: [], companyInvoice: '0',
companyPhone: '', companyPhone: '',
bankName: '', bankName: '',
bankAccount: '', bankAccount: '',
receiveType: '',
receiveContactor: '',
receiveMobile: '',
receiveArea: [],
receiveAddress: '',
// 短信验证 // 短信验证
corporationName: '', corporationName: '',
...@@ -703,9 +752,15 @@ ...@@ -703,9 +752,15 @@
'taxType': this.formRegister.companyTax, 'taxType': this.formRegister.companyTax,
'phone': this.formRegister.companyPhone, 'phone': this.formRegister.companyPhone,
'invoiceType': this.formRegister.companyInvoice, 'invoiceType': '0',
'openBank': this.formRegister.bankName, 'openBank': this.formRegister.bankName,
'bankAccount': this.formRegister.bankAccount, 'bankAccount': this.formRegister.bankAccount,
'receiveType': this.formRegister.receiveType,
'receiveContactor': this.formRegister.receiveContactor,
'receiveMobile': this.formRegister.receiveMobile,
'receiveArea': this.formRegister.receiveArea,
'receiveAddress': this.formRegister.receiveAddress,
'contactName': this.formRegister.corporationName, 'contactName': this.formRegister.corporationName,
'idcard': this.formRegister.corporationIdcard, 'idcard': this.formRegister.corporationIdcard,
...@@ -714,17 +769,7 @@ ...@@ -714,17 +769,7 @@
'password': this.formRegister.password, 'password': this.formRegister.password,
} }
for (let i = 0, len = funcParam.invoiceType.length; i < len; i++) {
if (funcParam.invoiceType[i] === '增值税专票') funcParam.invoiceType[i] = 0
if (funcParam.invoiceType[i] === '增值税普票') funcParam.invoiceType[i] = 1
if (funcParam.invoiceType[i] === '其他类型') funcParam.invoiceType[i] = 2
}
funcParam.invoiceType = funcParam.invoiceType.join()
console.log(JSON.stringify(funcParam)) console.log(JSON.stringify(funcParam))
// return
iRequest.request(iHost.base + 'bid/zUserCompany/registerCompany', funcParam, 'json', 'post') iRequest.request(iHost.base + 'bid/zUserCompany/registerCompany', funcParam, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
this.state = 11 this.state = 11
...@@ -881,6 +926,19 @@ ...@@ -881,6 +926,19 @@
/** /**
* 地域选择组件
* @function
* @param {array } funcArea - ['省份', '城市', '区域' ]
* @returns
*/
onAreaChange: function (funcArea) {
this.formRegister.receiveArea = funcArea
this.$store.commit('areaSelection', funcArea)
},
/**
* 上传组件 - 文件格式 * 上传组件 - 文件格式
* @function * @function
* @param {string} funcType * @param {string} funcType
......
<template> <template>
<!-- 通用组件 - 登录 --> <!-- 通用组件 - 登录 -->
<div class="currency-sign-in-input row con-c"> <div class="currency-sign-in-input row con-c">
<div class="main global-maxwidth"> <div class="main global-maxwidth">
<!-- 页面地图 --> <!-- 页面地图 -->
<div> <div>
<currencyMap></currencyMap> <currencyMap></currencyMap>
</div> </div>
<!-- 登录信息 --> <!-- 登录信息 -->
<div class="row con-c align-s"> <div class="row con-c align-s">
<div class="currency-sign-in-form col con-b"> <div class="currency-sign-in-form col con-b">
<div> <div>
<span>{{statusText}}</span> <span>{{statusText}}</span>
</div> </div>
<el-form ref="formSignIn" :model="info" :rules="rule" label-width="0"> <el-form ref="formSignIn" :model="info" :rules="rule" label-width="0">
<el-form-item prop="phone"> <el-form-item prop="phone">
<el-input v-model="info.phone" placeholder="手机号" :autofocus="true" maxlength="11" @keyup.enter.native="onSignInSubmit()"></el-input> <el-input v-model="info.phone" placeholder="手机号" :autofocus="true" maxlength="11" @keyup.enter.native="onSignInSubmit()"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="info.password" show-password maxlength="20" placeholder="密码" @keyup.enter.native="onSignInSubmit()"></el-input> <el-input v-model="info.password" show-password maxlength="20" placeholder="密码" @keyup.enter.native="onSignInSubmit()"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-show="showImageCode" class="form-item-code" prop="code"> <el-form-item v-show="showImageCode" class="form-item-code" prop="code">
<el-input v-model="info.code" maxlength="4" placeholder="请输入验证码" @keyup.enter.native="onSignInSubmit()"></el-input> <el-input v-model="info.code" maxlength="4" placeholder="请输入验证码" @keyup.enter.native="onSignInSubmit()"></el-input>
<button @click.prevent=""><img :src="imageCodeData" alt=""></button> <button @click.prevent=""><img :src="imageCodeData" alt=""></button>
</el-form-item> </el-form-item>
<div class="row con-b align-c"> <div class="row con-b align-c">
<!-- <el-checkbox v-model="isRecordPassword" @change="onCheckboxChange">记住密码</el-checkbox> --> <!-- <el-checkbox v-model="isRecordPassword" @change="onCheckboxChange">记住密码</el-checkbox> -->
<span></span> <span></span>
<span class="currency-sign-in-forget global-cursor" @click="onForget()">忘记密码?</span> <span class="currency-sign-in-forget global-cursor" @click="onForget()">忘记密码?</span>
</div> </div>
<el-form-item class="submit"> <el-form-item class="submit">
<button class="global-cursor" @click.prevent="onSignInSubmit()">登录</button> <button class="global-cursor" @click.prevent="onSignInSubmit()">登录</button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="row con-c align-c"> <div class="row con-c align-c">
<span class="global-cursor">没有账号?</span> <span class="global-cursor">没有账号?</span>
<span class="global-cursor" @click="onRegister">立即注册</span> <span class="global-cursor" @click="onRegister">立即注册</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iCryptoJs from 'crypto-js' import iCryptoJs from 'crypto-js'
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
import iRule from '@/common/js/rule/rule.js' import iRule from '@/common/js/rule/rule.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iCurrencyMap from '@/components/currency-map.vue' import iCurrencyMap from '@/components/currency-map.vue'
export default { export default {
components: { components: {
currencyMap: iCurrencyMap, currencyMap: iCurrencyMap,
}, },
data: function () { data: function () {
return { return {
statusText: '', statusText: '',
isRecordPassword: false, isRecordPassword: false,
info: { info: {
'name': '', // 名称 'name': '', // 名称
'phone': '', // 登录号码 'phone': '', // 登录号码
'password': '', // 记录密码 'password': '', // 记录密码
'register': '', // 审核状态 'register': '', // 审核状态
'identity': '', // 登录身份 'identity': '', // 登录身份
'code': '' 'code': ''
}, },
imageCodeData: '', imageCodeData: '',
showImageCode: false, showImageCode: false,
// 表单验证 // 表单验证
rule: { rule: {
phone: [ phone: [
{ required: true, message: '请输入手机号码', trigger: 'blur' } { required: true, message: '请输入手机号码', trigger: 'blur' }
], ],
password: [ password: [
{ required: true, message: '请输入登录密码', trigger: 'blur' } { required: true, message: '请输入登录密码', trigger: 'blur' }
], ],
}, },
} }
}, },
created: function () { created: function () {
this.reset() this.reset()
this.init() this.init()
}, },
methods: { methods: {
/** /**
* 设置登录文本以及登录身份 * 设置登录文本以及登录身份
* @function * @function
* @returns * @returns
*/ */
init: function () { init: function () {
// 1 - 专家 // 1 - 专家
// 2 - 商家 // 2 - 商家
switch (this.$route.query.status) { switch (this.$route.query.status) {
case 'specialist': case 'specialist':
this.info.identity = 1 this.info.identity = 1
this.statusText = '专家登录' this.statusText = '专家登录'
break break
case 'supplier': case 'supplier':
this.info.identity = 2 this.info.identity = 2
this.statusText = '供应商登录' this.statusText = '供应商登录'
break break
case 'agency': case 'agency':
this.info.identity = 3 this.info.identity = 3
this.statusText = '代理商登录' this.statusText = '代理商登录'
break break
default: default:
this.$router.push('/signIn') this.$router.push('/signIn')
break break
} }
}, },
reset: function () { reset: function () {
this.info = { this.info = {
'name': '', // 名称 'name': '', // 名称
'phone': '', // 登录号码 'phone': '', // 登录号码
'password': '', // 记录密码 'password': '', // 记录密码
'register': '', // 审核状态 'register': '', // 审核状态
'identity': '', // 登录身份 'identity': '', // 登录身份
'code': '' 'code': ''
} }
this.imageCodeData = '' this.imageCodeData = ''
this.showImageCode = false this.showImageCode = false
}, },
/** /**
* 读取登录信息 * 读取登录信息
* @function * @function
* @returns * @returns
*/ */
loadSignInInfo: function () { loadSignInInfo: function () {
let funcSignInRecord let funcSignInRecord
switch (this.info.identity) { switch (this.info.identity) {
case 1: case 1:
funcSignInRecord = localStorage.getItem('signInSpecialist') funcSignInRecord = localStorage.getItem('signInSpecialist')
break break
case 2: case 2:
funcSignInRecord = localStorage.getItem('signInSupplier') funcSignInRecord = localStorage.getItem('signInSupplier')
break break
} }
if (funcSignInRecord) { if (funcSignInRecord) {
this.info.phone = JSON.parse(funcSignInRecord).phone this.info.phone = JSON.parse(funcSignInRecord).phone
this.info.password = JSON.parse(funcSignInRecord).password this.info.password = JSON.parse(funcSignInRecord).password
this.isRecordPassword = true this.isRecordPassword = true
} }
}, },
/** /**
* 登录时保存登录信息 * 登录时保存登录信息
* @function * @function
* @returns * @returns
*/ */
recordPassword: function () { recordPassword: function () {
if (!this.isRecordPassword) return if (!this.isRecordPassword) return
let funcParam = { let funcParam = {
'phone': this.info.phone, 'phone': this.info.phone,
'password': this.info.password, 'password': this.info.password,
} }
switch (this.info.identity) { switch (this.info.identity) {
case 1: case 1:
localStorage.setItem('signInSpecialist', JSON.stringify(funcParam)) localStorage.setItem('signInSpecialist', JSON.stringify(funcParam))
break break
case 2: case 2:
localStorage.setItem('signInSupplier', JSON.stringify(funcParam)) localStorage.setItem('signInSupplier', JSON.stringify(funcParam))
break break
} }
}, },
queryUserInfo: function () { queryUserInfo: function () {
switch (this.info.identity) { switch (this.info.identity) {
case 1: case 1:
iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.name this.info.name = funcResponse.name
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', this.info) this.$store.commit('info', this.info)
localStorage.setItem('info', JSON.stringify(this.info)) localStorage.setItem('info', JSON.stringify(this.info))
this.redirectPath() this.redirectPath()
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 2: case 2:
iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.companyName this.info.name = funcResponse.companyName
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('isSignIn', true) this.info.isJoinBid = Number(funcResponse.isJoinBid) === 0 ? false : true
this.$store.commit('info', this.info) this.$store.commit('isSignIn', true)
localStorage.setItem('info', JSON.stringify(this.info)) this.$store.commit('info', this.info)
this.redirectPath() localStorage.setItem('info', JSON.stringify(this.info))
}) this.redirectPath()
.catch((funcError) => { })
this.$message.error(funcError.message) .catch((funcError) => {
}) this.$message.error(funcError.message)
break })
} break
}
},
},
redirectPath: function () {
if (this.$store.getters.redirectPath) { redirectPath: function () {
this.$router.push(this.$store.getters.redirectPath) if (this.$store.getters.redirectPath) {
} else { this.$router.push(this.$store.getters.redirectPath)
this.$router.push('/') } else {
} this.$router.push('/')
}, }
},
/**
* 密码加密 /**
* @function * 密码加密
* @param {number} value - 加密字段 * @function
* @param {array } key * @param {number} value - 加密字段
* @returns * @param {array } key
*/ * @returns
encryptByDES: function (value, key) { */
if(value == '') return ''; encryptByDES: function (value, key) {
var keyHex = iCryptoJs.enc.Utf8.parse(key); if(value == '') return '';
var encrypted = iCryptoJs.DES.encrypt(value, keyHex, { var keyHex = iCryptoJs.enc.Utf8.parse(key);
mode: iCryptoJs.mode.ECB, var encrypted = iCryptoJs.DES.encrypt(value, keyHex, {
padding: iCryptoJs.pad.Pkcs7 mode: iCryptoJs.mode.ECB,
}) padding: iCryptoJs.pad.Pkcs7
return encrypted.toString() })
}, return encrypted.toString()
},
/**
* 登录 /**
* @function * 登录
* @param {number} funcIndex - 组件索引 * @function
* @param {array } funcSelectId - ['id01', 'id02', 'id03', 'id04', '' ] * @param {number} funcIndex - 组件索引
* @returns * @param {array } funcSelectId - ['id01', 'id02', 'id03', 'id04', '' ]
*/ * @returns
onSignInSubmit: function () { */
this.$refs.formSignIn.validate(funcValid => { onSignInSubmit: function () {
if (funcValid) { this.$refs.formSignIn.validate(funcValid => {
let funcParam = { if (funcValid) {
'loginName': this.info.phone, let funcParam = {
'password': this.encryptByDES(this.info.password, 'bidkey11'), 'loginName': this.info.phone,
'userType': this.info.identity, 'password': this.encryptByDES(this.info.password, 'bidkey11'),
'vCode': this.info.code 'userType': this.info.identity,
} 'vCode': this.info.code
}
iRequest.request(iHost.base + 'bid/zLogin/login', funcParam, 'json', 'post', { isToken: false })
.then((funcResponse) => { iRequest.request(iHost.base + 'bid/zLogin/login', funcParam, 'json', 'post', { isToken: false })
localStorage.clear() .then((funcResponse) => {
localStorage.setItem('token', funcResponse.token) localStorage.clear()
localStorage.setItem('refresh', funcResponse.refreshToken) localStorage.setItem('token', funcResponse.token)
this.recordPassword() localStorage.setItem('refresh', funcResponse.refreshToken)
this.queryUserInfo() this.recordPassword()
}) this.queryUserInfo()
.catch((funcError) => { })
if (funcError.data) { .catch((funcError) => {
this.showImageCode = true if (funcError.data) {
this.imageCodeData = funcError.data.imgCode this.showImageCode = true
} this.imageCodeData = funcError.data.imgCode
}) }
} })
}) }
}, })
},
/**
* 勾选组件 - 记录密码 /**
* @function * 勾选组件 - 记录密码
* @param {number} funcValue * @function
* @returns * @param {number} funcValue
*/ * @returns
onCheckboxChange: function (funcValue) { */
this.isRecordPassword = funcValue onCheckboxChange: function (funcValue) {
if (!this.isRecordPassword) { this.isRecordPassword = funcValue
switch (this.info.identity) { if (!this.isRecordPassword) {
case 1: switch (this.info.identity) {
localStorage.removeItem('signInSpecialist') case 1:
break localStorage.removeItem('signInSpecialist')
break
case 2:
localStorage.removeItem('signInSupplier') case 2:
break localStorage.removeItem('signInSupplier')
} break
} }
}, }
},
onForget: function () {
this.$router.push('/signIn/forget?status=' + this.$route.query.status) onForget: function () {
}, this.$router.push('/signIn/forget?status=' + this.$route.query.status)
},
onRegister: function () {
this.$router.push('/register?status=' + this.$route.query.status) onRegister: function () {
}, this.$router.push('/register?status=' + this.$route.query.status)
}, },
} },
</script> }
</script>
<style lang="less">
.currency-sign-in-input { <style lang="less">
width: 100%; .currency-sign-in-input {
background-image: url(@backgroundImageUrl); width: 100%;
background-image: url(@backgroundImageUrl);
> div {
width: 1200px; > div {
min-height: 480px; width: 1200px;
margin-top: 36px; min-height: 480px;
margin-bottom: 40px; margin-top: 36px;
padding: 32px 32px 0 32px; margin-bottom: 40px;
background: @colorWhite; padding: 32px 32px 0 32px;
box-shadow: 0px 0px 20px 0px rgba(41, 41, 41, 0.05); background: @colorWhite;
box-shadow: 0px 0px 20px 0px rgba(41, 41, 41, 0.05);
.currency-sign-in-form {
width: 428px; .currency-sign-in-form {
height: 380px; width: 428px;
margin-top: 20px; height: 380px;
padding: 20px 26px; margin-top: 20px;
background:rgba(255, 255, 255, 1); padding: 20px 26px;
box-shadow: 0px 0px 45px 0px rgba(41, 41, 41, 0.1); background:rgba(255, 255, 255, 1);
border-radius: 15px; box-shadow: 0px 0px 45px 0px rgba(41, 41, 41, 0.1);
border-radius: 15px;
.form-item-code {
> div { .form-item-code {
display: flex; > div {
flex-direction: row; display: flex;
flex-direction: row;
.el-input {
display: inline-block; .el-input {
width: 182px; display: inline-block;
} width: 182px;
}
button {
display: inline-block; button {
width: 180px; display: inline-block;
height: 40px; width: 180px;
margin-left: 10px; height: 40px;
padding: 0; margin-left: 10px;
border: none; padding: 0;
color: @colorWhite; border: none;
background: @colorBlue; color: @colorWhite;
background: @colorBlue;
img {
width: 180px; img {
height: 40px; width: 180px;
} height: 40px;
} }
} }
} }
}
> div:nth-child(1) {
margin-bottom: 10px; > div:nth-child(1) {
margin-bottom: 10px;
span {
color: @colorBlue; span {
font-size: @fontSize04; color: @colorBlue;
background: #FFFFFF; font-size: @fontSize04;
} background: #FFFFFF;
} }
}
.el-form-item {
width: 376px; .el-form-item {
} width: 376px;
}
.el-checkbox {
span { .el-checkbox {
color: @colorGrey60; span {
} color: @colorGrey60;
} }
}
.submit button {
width: 376px; .submit button {
height: 50px; width: 376px;
margin-top: 10px; height: 50px;
border: none; margin-top: 10px;
border-radius: 25px; border: none;
font-size: @fontSize02; border-radius: 25px;
letter-spacing: 4px; font-size: @fontSize02;
background: @colorBlue; letter-spacing: 4px;
color: @colorWhite; background: @colorBlue;
} color: @colorWhite;
}
.currency-sign-in-forget {
text-align: right; .currency-sign-in-forget {
font-size: @fontSize01; text-align: right;
color: @colorBlue; font-size: @fontSize01;
background: #FFFFFF; color: @colorBlue;
} background: #FFFFFF;
}
> div:nth-child(3) {
span:nth-child(1) { > div:nth-child(3) {
color: @colorGrey60; span:nth-child(1) {
font-size: @fontSize01; color: @colorGrey60;
} font-size: @fontSize01;
}
span:nth-child(2) {
color: @colorBlue; span:nth-child(2) {
font-size: @fontSize01; color: @colorBlue;
} font-size: @fontSize01;
} }
} }
} }
} }
</style> }
</style>
<template> <template>
<!-- 通用组件 - 头部 --> <!-- 通用组件 - 头部 -->
<div class="components-specialist-header row con-b align-c" @mouseleave="onMenuControl('leave')"> <div class="components-specialist-header row con-b align-c" @mouseleave="onMenuControl('leave')">
<div class="title"> <div class="title">
<span>我的工作台</span> <span>我的工作台</span>
</div> </div>
<div class="personal row align-c"> <div class="personal row align-c">
<img class="global-cursor" src="../../../assets/currency-map.png" alt="" @click="$router.push('/')"> <img class="global-cursor" src="../../../assets/currency-map.png" alt="" @click="$router.push('/')">
<el-badge :is-dot="isNewNotice" class="row align-c"> <el-badge :is-dot="isNewNotice" class="row align-c">
<img class="global-cursor" src="../../../assets/notice-tip.png" alt="" @click="$router.push('/specialist/notify')"> <img class="global-cursor" src="../../../assets/notice-tip.png" alt="" @click="$router.push('/specialist/notify')">
</el-badge> </el-badge>
<span>{{info ? info.name : ''}}</span> <span>{{info ? info.name : ''}}</span>
<span class="global-cursor" @click="onSignOut()">退出</span> <span class="global-cursor" @click="onSignOut()">退出</span>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iToken from '@/common/js/token.js' import iToken from '@/common/js/token.js'
export default { export default {
data: function () { data: function () {
return { return {
isNewNotice: false, isNewNotice: false,
winMenu: false, winMenu: false,
} }
}, },
computed: { computed: {
info: function () { info: function () {
return this.$store.state.info return this.$store.state.info
}, },
notify: function () { notify: function () {
return this.$store.state.notify return this.$store.state.notify
}, },
}, },
watch: { watch: {
info: { info: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
notify: { notify: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
this.queryNotice() this.queryNotice()
}, },
deep: true, deep: true,
immediate: true, immediate: true,
} }
}, },
created: function () { created: function () {
this.init() this.init()
this.queryNotice() this.queryNotice()
}, },
methods: { methods: {
/** /**
* 检查登录状态 * 检查登录状态
* @function * @function
* @returns * @returns
*/ */
init: function () { init: function () {
let funcToken = localStorage.getItem('token') let funcToken = localStorage.getItem('token')
console.log('funcToken - 3', funcToken) console.log('funcToken - 3', funcToken)
if (!funcToken) { if (!funcToken) {
this.$router.push('/signIn') this.$router.push('/signIn')
return return
} }
console.log(iToken.state(funcToken)) console.log(iToken.state(funcToken))
switch (iToken.state(funcToken)) { switch (iToken.state(funcToken)) {
case 'valid': case 'valid':
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', JSON.parse(localStorage.getItem('info'))) this.$store.commit('info', JSON.parse(localStorage.getItem('info')))
break break
case 'refresh': case 'refresh':
this.$store.commit('isSignIn', true) this.$store.commit('isSignIn', true)
this.$store.commit('info', JSON.parse(localStorage.getItem('info'))) this.$store.commit('info', JSON.parse(localStorage.getItem('info')))
iRequest.request(iHost.base + 'bid/zLogin/refreshToken', { 'refreshToken': localStorage.getItem('refresh') }, 'json', 'get') iRequest.request(iHost.base + 'bid/zLogin/refreshToken', { 'refreshToken': localStorage.getItem('refresh') }, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
console.log(funcResponse) console.log(funcResponse)
localStorage.setItem('token', funcResponse.token) localStorage.setItem('token', funcResponse.token)
localStorage.setItem('refresh', funcResponse.refreshToken) localStorage.setItem('refresh', funcResponse.refreshToken)
this.queryUserInfo() this.queryUserInfo()
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 'relist': case 'relist':
this.onSignOut() this.onSignOut()
break break
} }
}, },
queryNotice: function () { queryNotice: function () {
iRequest.request(iHost.base + 'bid/zNotification/countUnread', { 'userType': 1 }, 'json', 'post') iRequest.request(iHost.base + 'bid/zNotification/countUnread', { 'userType': 1 }, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
if (funcResponse.count > 0) { if (funcResponse.count > 0) {
this.isNewNotice = true this.isNewNotice = true
} else { } else {
this.isNewNotice = false this.isNewNotice = false
} }
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
}, },
queryUserInfo: function () { queryUserInfo: function () {
switch (this.info.identity) { switch (this.info.identity) {
case 1: case 1:
iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserExpert/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.name this.info.name = funcResponse.name
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('info', this.info) this.$store.commit('info', this.info)
localStorage.setItem('info', JSON.stringify(this.info)) localStorage.setItem('info', JSON.stringify(this.info))
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
break break
case 2: case 2:
iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/zUserCompany/getLoginUserInfo', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
// 0 - 审核 // 0 - 审核
// 1 - 通过 // 1 - 通过
// 2 - 拒绝 // 2 - 拒绝
this.info.name = funcResponse.companyName this.info.name = funcResponse.companyName
this.info.register = Number(funcResponse.state) this.info.register = Number(funcResponse.state)
this.$store.commit('info', this.info) this.info.isJoinBid = Number(funcResponse.isJoinBid) === 0 ? false : true
localStorage.setItem('info', JSON.stringify(this.info)) this.$store.commit('info', this.info)
}) localStorage.setItem('info', JSON.stringify(this.info))
.catch((funcError) => { })
this.$message.error(funcError.message) .catch((funcError) => {
}) this.$message.error(funcError.message)
break })
} break
}, }
},
onMenuControl: function (funcType) {
switch (funcType) { onMenuControl: function (funcType) {
case 'enter': switch (funcType) {
this.winMenu = true case 'enter':
break this.winMenu = true
break
case 'leave':
this.winMenu = false case 'leave':
break this.winMenu = false
} break
}, }
},
onSignOut: function () {
this.$router.push('/') onSignOut: function () {
this.$store.commit('info', null) this.$router.push('/')
this.$store.commit('isSignIn', false) this.$store.commit('info', null)
this.$store.commit('redirectPath', null) this.$store.commit('isSignIn', false)
localStorage.clear() this.$store.commit('redirectPath', null)
} localStorage.clear()
} }
} }
</script> }
</script>
<style lang="less">
.components-specialist-header { <style lang="less">
width: 100%; .components-specialist-header {
height: 60px; width: 100%;
padding: 0 40px; height: 60px;
background-image: url(../../../assets/bg-title.png); padding: 0 40px;
background-repeat: no-repeat; background-image: url(../../../assets/bg-title.png);
background-repeat: no-repeat;
.title {
color: #FFFFFF; .title {
} color: #FFFFFF;
}
.personal {
position: relative; .personal {
height: 100%; position: relative;
color: #FFFFFF; height: 100%;
color: #FFFFFF;
span {
margin-left: 20px; span {
} margin-left: 20px;
}
img {
width: 16px; img {
height: 16px; width: 16px;
margin-left: 6px; height: 16px;
} margin-left: 6px;
}
.menu {
z-index: 7; .menu {
position: absolute; z-index: 7;
top: 42px; position: absolute;
width: 190px; top: 42px;
height: 60px; width: 190px;
background: #FFFFFF; height: 60px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15); background: #FFFFFF;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
.sign-out {
height: 60px; .sign-out {
font-size: @fontSize01; height: 60px;
color: #000000; font-size: @fontSize01;
} color: #000000;
} }
} }
} }
</style> }
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment