| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204 |
- <template>
- <div class="apply-info">
- <div class="apply-info-title">
- <p>最新求购信息</p>
- <span>海量求购,一网打尽</span>
- <div>
- <input type="text" class="form-control" v-model="keyWord" @keyup.13="searchList" placeholder="型号/品牌" />
- <span @click="searchList">查询</span>
- </div>
- </div>
- <div class="apply-info-list">
- <p>
- <span>发布时间
- <a href="javascript:void(0)" @click="sortListByParam('releaseDate')">
- <i class=" fa fa-long-arrow-up" :class="{active: sorting.releaseDate == 'ASC'}"></i>
- <i class=" fa fa-long-arrow-down" :class="{active: sorting.releaseDate == 'DESC'}"></i>
- </a>
- </span>
- <span>买家</span>
- <span>型号</span>
- <span>品牌</span>
- <span>截止时间
- <a href="javascript:void(0)" @click="sortListByParam('deadline')">
- <i class=" fa fa-long-arrow-up" :class="{active: sorting.deadline == 'ASC'}"></i>
- <i class=" fa fa-long-arrow-down" :class="{active: sorting.deadline == 'DESC'}"></i>
- </a>
- </span>
- <span>已报价
- <a href="javascript:void(0)" @click="sortListByParam('offerAmount')">
- <i class=" fa fa-long-arrow-up" :class="{active: sorting.offerAmount == 'ASC'}"></i>
- <i class=" fa fa-long-arrow-down" :class="{active: sorting.offerAmount == 'DESC'}"></i>
- </a>
- </span>
- <span>操作</span>
- </p>
- <ul>
- <li v-for="(purchaseMan, index) in purchaseManList.content" :class="{'active': purchaseMan.active}">
- <div>{{purchaseMan.date| date}}</div>
- <div :title="purchaseMan.userName || (purchaseMan.inquiry.enterprise ? purchaseMan.inquiry.enterprise.enName ? purchaseMan.inquiry.enterprise.enName : '-' : '-' || '-')">{{purchaseMan.userName || (purchaseMan.inquiry.enterprise ? purchaseMan.inquiry.enterprise.enName ? purchaseMan.inquiry.enterprise.enName : '-' : '-' || '-')}}</div>
- <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode || '-'}}</div>
- <div :title="purchaseMan.inbrand">{{purchaseMan.inbrand || '-'}}</div>
- <div class="date-content">
- <div v-if="purchaseMan.remainingTime > 0">
- <span>剩余 </span>
- <span v-if="getDay(purchaseMan.remainingTime) > 0" v-text="getDay(purchaseMan.remainingTime)"></span>
- <i v-if="getDay(purchaseMan.remainingTime) > 0"> 天 </i>
- <span v-if="getDay(purchaseMan.remainingTime) <= 0" v-text="getHours(purchaseMan.remainingTime)"></span>
- <i v-if="getDay(purchaseMan.remainingTime) <= 0" > 小时</i>
- </div>
- <span v-if="!purchaseMan.remainingTime || purchaseMan.remainingTime <= 0">已截止</span>
- </div>
- <div class="number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10"><span :style="purchaseMan.offerAmount > 10 ? 'color: #ff9a00': ''">{{purchaseMan.offerAmount || 0}}</span> 条</div>
- <div class="btn-content">
- <a @click="setLinkBoxIndex(index)">联系买家</a>
- <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1)" @click="sayPrice(purchaseMan, index)">我要报价</a>
- <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt="">
- <!--<div class="say-price-history">
- <p class="price-title">历史报价</p>
- <div>
- <div>
- <span>交期:</span><span class="red-text">6 天</span>
- </div>
- <div>
- <span>附件:</span><a href="">下载</a>
- </div>
- <div class="pre-line">
- <span>规格:</span>2016-05-21
- </div>
- <p class="price-level">价格梯度</p>
- <ul>
- <li>
- <span>1333+</span>
- <span>$123123</span>
- </li>
- <li>
- <span>1333+</span>
- <span>$123123</span>
- </li>
- <li>
- <span>1333+</span>
- <span>$123123</span>
- </li>
- </ul>
- </div>
- </div>-->
- </div>
- </div>
- <div class="expand-content">
- <div>
- 封装:{{purchaseMan.encapsulation || '-'}}
- </div>
- <div>
- 采购数量:<span>{{purchaseMan.needquantity || '-'}}</span><span v-if="purchaseMan.needquantity">个</span>
- </div>
- <div>
- 单价预算:<span>{{purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'}}</span>
- </div>
- <div>
- 规格:{{purchaseMan.produceDate || '-'}}
- </div>
- </div>
- <!--<div class="say-price">
- <div>报价</div>
- <div>
- <i>*</i>单价
- <select v-if="!purchaseMan.currency" v-model="sayPriceObj.currency">
- <option value="RMB">¥</option>
- <option value="USD">$</option>
- </select>
- <div v-if="purchaseMan.currency" v-text="purchaseMan.currency == 'RMB' ? '¥' : '$'"></div>
- <input type="number" v-model="sayPriceObj.unitPrice" class="form-control" @blur="onUnitPriceBlur" @input="onUnitPriceChange">
- </div>
- <div>
- <i>*</i>交期
- <input type="number" v-model="sayPriceObj.minDay" @blur="onMinDayInput" @input="onMinDayChange" class="form-control"> - <input type="number" v-model="sayPriceObj.maxDay" @blur="onMaxDayInput" @input="onMaxDayChange" class="form-control"> 天
- </div>
- <div>
- 生产日期 <input v-model="sayPriceObj.produceDate" @input="onProduceDateChange" type="text" class="form-control">
- </div>
- <div>
- <span @click="cancelSayPrice(purchaseMan)">取消</span>
- <span @click="commitSayPrice(purchaseMan)">提交</span>
- </div>
- </div>-->
- </li>
- </ul>
- </div>
- <div class="modal-wrap" v-if="currentSayPriceIndex > -1">
- <div class="say-price-box" >
- <div class="title">
- <div>型号:<span :title="purchaseManList.content[currentSayPriceIndex].cmpCode">{{purchaseManList.content[currentSayPriceIndex].cmpCode}}</span></div>
- <div>品牌:<span :title="purchaseManList.content[currentSayPriceIndex].inbrand">{{purchaseManList.content[currentSayPriceIndex].inbrand}}</span></div>
- <i class="fa fa-close" @click="cancelSayPrice"></i>
- </div>
- <div class="content">
- <div class="content-line">
- <div class="form-item form-left">
- <span><i>*</i>交期:</span>
- <input type="number" class="form-control" placeholder="天数" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
- <!-- -
- <input type="text" class="form-control" placeholder="天数">-->
- </div>
- <!--<div class="form-item form-upload">
- <label>
- <span><i>+</i>添加附件</span>
- <input type="file">
- </label>
- <!–<div>
- <span>我是Excel的名字111</span>
- <i class="fa fa-times-circle"></i>
- <a href="">更换</a>
- </div>–>
- </div>-->
- </div>
- <div class="content-line" v-for="(reply, index) in sayPriceObj.replies">
- <div class="form-item form-left">
- <span><i>*</i>价格梯度:</span>
- <input type="number" class="form-control" @blur="onReplyLapQtyBlur(index)" v-model="reply.lapQty" placeholder="数量">
- <!-- -
- <input type="text" class="form-control" placeholder="数量">-->
- </div>
- <div class="form-item form-right">
- <span><i>*</i>单价<span v-if="purchaseManList.content[currentSayPriceIndex].currency" v-text="purchaseManList.content[currentSayPriceIndex].currency == 'USD' ? '$' : '¥'"></span>:</span>
- <!--{{purchaseManList.content[currentSayPriceIndex].currency == 'USD' ? '$' : '¥'}})-->
- <select v-if="!purchaseManList.content[currentSayPriceIndex].currency" v-model="sayPriceObj.currency">
- <option value="RMB">¥</option>
- <option value="USD">$</option>
- </select>
- <input type="number" class="form-control" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" placeholder="单价" v-model="reply.price">
- <i class="fa fa-minus-circle" v-if="sayPriceObj.replies.length > 1" @click="setReplies('sub', index)"></i>
- <i class="fa fa-plus-circle" v-if="sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
- </div>
- </div>
- </div>
- <div class="operate">
- <span @click="commitSayPrice">确定</span>
- <span @click="cancelSayPrice">取消</span>
- </div>
- </div>
- </div>
- <page :total="totalCount" :page-size="pageSize"
- :current="nowPage" v-on:childEvent="listenPage"></page>
- <loading v-show="showLoading"></loading>
- <div class="com-del-box link-saler-box" v-if="linkBoxIndex > -1">
- <div class="title">
- <i @click="setLinkBoxIndex(-1)"></i>
- </div>
- <div class="content">
- <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与买家在线沟通!</p>
- <p>买家联系电话:<span v-text="purchaseManList.content[linkBoxIndex].userTel"></span></p>
- <div>
- <a @click="setLinkBoxIndex(-1)">我知道了</a>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- // let getRealLen = function (str) {
- // let len = 0
- // for (let i = 0; i < str.length; i++) {
- // if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
- // len += 2
- // } else {
- // len++
- // }
- // }
- // return len
- // }
- // let cutOutString = function (str, length) {
- // for (let i = 1; i <= str.length; i++) {
- // if (getRealLen(str.substr(0, i)) > length) {
- // str = str.substr(0, i - 1)
- // break
- // }
- // }
- // return str
- // }
- import Page from '~components/common/page/pageComponent.vue'
- import Loading from '~components/common/loading/PageLoading.vue'
- export default {
- data () {
- return {
- pageSize: 10,
- nowPage: 1,
- sayPriceObj: {
- currency: 'RMB',
- leadtime: '',
- replies: [
- {
- lapQty: '',
- price: ''
- }
- ]
- },
- validSayPrice: {
- leadtime: false,
- repliesPrice: false,
- repliesLapQty: false
- },
- keyWord: '',
- sorting: {},
- showLoading: false,
- currentSayPriceIndex: -1,
- linkBoxIndex: -1
- }
- },
- components: {
- Page,
- Loading
- },
- filters: {
- date: function (date) {
- const d = new Date(Number(date))
- const year = d.getFullYear()
- const monthTemp = d.getMonth() + 1
- const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
- const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
- const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
- const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
- return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
- },
- phone: function (str) {
- return str.substring(0, 3) + '****' + str.substring(7, 11)
- }
- },
- computed: {
- purchaseManList () {
- return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
- },
- totalCount () {
- return this.purchaseManList.totalElements
- },
- user () {
- return this.$store.state.option.user
- }
- },
- methods: {
- getDay: function (timeStamp) {
- return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
- },
- getHours: function (timeStamp) {
- return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
- },
- // getPurchaseManName: function (purchaseMan) {
- // return purchaseMan.enUu ? purchaseMan.userName : purchaseMan.userName.charAt(0) + '**'
- // },
- listenPage: function (page) {
- this.nowPage = page
- this.resetList()
- },
- sayPrice: function (purchaseMan, index) {
- let _this = this
- for (let i = 0; i < this.purchaseManList.content.length; i++) {
- _this.purchaseManList.content[i].active = false
- }
- this.resetSayPrice()
- purchaseMan.active = true
- this.currentSayPriceIndex = index
- },
- cancelSayPrice: function () {
- this.purchaseManList.content[this.currentSayPriceIndex].active = false
- this.currentSayPriceIndex = -1
- },
- commitSayPrice: function () {
- if (this.user.logged) {
- if (this.user.data.enterprise.uu) {
- if (this.checkValid()) {
- let purchaseMan = this.purchaseManList.content[this.currentSayPriceIndex]
- this.showLoading = true
- purchaseMan.leadtime = this.sayPriceObj.leadtime
- purchaseMan.replies = this.sayPriceObj.replies
- purchaseMan.vendUU = this.user.data.enterprise.uu
- purchaseMan.vendorUserUU = this.user.data.userUU
- purchaseMan.qutoApp = 'MALL'
- if (!purchaseMan.currency) {
- purchaseMan.currency = this.sayPriceObj.currency
- }
- this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
- this.showLoading = false
- if (response.data.success === false) {
- this.$message.error(response.data.message)
- } else {
- this.$message.success('报价成功')
- this.resetSayPrice()
- this.resetList()
- }
- }, error => {
- console.log(error)
- this.$message.error('请检查报价信息是否填写正确')
- this.showLoading = false
- })
- } else {
- this.$message.error('请输入正确的报价信息')
- }
- } else {
- this.$message.error('个人账户不可报价')
- }
- // if (this.checkAllSayPrice()) {
- // } else {
- // if (!this.validSayPrice.unitPrice) {
- // if (!this.sayPriceObj.unitPrice) {
- // this.$message.error('单价不能为空')
- // } else {
- // this.$message.error('单价必须是大于0的数字')
- // }
- // } else if (!this.validSayPrice.minDay || !this.validSayPrice.maxDay) {
- // if ((!this.sayPriceObj.minDay && this.sayPriceObj.minDay !== 0) || (!this.sayPriceObj.maxDay && this.sayPriceObj.maxDay !== 0)) {
- // this.$message.error('交期不能为空')
- // } else {
- // if (this.sayPriceObj.minDay > 31 || this.sayPriceObj.minDay < 1 || this.sayPriceObj.minDay.toString().indexOf('.') !== -1 || this.sayPriceObj.maxDay > 31 || this.sayPriceObj.maxDay < 1 || this.sayPriceObj.maxDay.toString().indexOf('.') !== -1) {
- // this.$message.error('交期只能填写1-31之间的整数值')
- // } else {
- // this.$message.error('最短交期应小于等于最长交期')
- // }
- // }
- // }
- // }
- } else {
- this.$router.push('/auth/login?returnUrl=' + window.location.href)
- }
- },
- resetList: function () {
- this.currentSayPriceIndex = -1
- this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.nowPage, pageSize: this.pageSize, keyword: this.keyWord, sorting: !this.sorting || JSON.stringify(this.sorting) === '{}' ? {releaseDate: 'DESC'} : this.sorting, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
- },
- resetSayPrice: function () {
- this.sayPriceObj = {
- currency: 'RMB',
- leadtime: '',
- replies: [
- {
- lapQty: '',
- price: ''
- }
- ]
- }
- },
- onLeadtimeInput: function () {
- if (this.sayPriceObj.leadtime.length > 2) {
- this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 2)
- }
- },
- onLeadtimeBlur: function () {
- if (!this.sayPriceObj.leadtime || this.sayPriceObj.leadtime < 1 || this.sayPriceObj.leadtime > 31 || this.sayPriceObj.leadtime.toString().indexOf('.') !== -1) {
- this.validSayPrice.leadtime = false
- this.$message.error('交期只能填写1-31之间的整数值')
- } else {
- this.validSayPrice.leadtime = true
- }
- },
- onReplyPriceInput: function (index) {
- let price = this.sayPriceObj.replies[index].price
- if (price >= 10000) {
- this.sayPriceObj.replies[index].price = price.substring(0, 4)
- } else if (price.indexOf('.') > -1) {
- let arr = price.split('.')
- if (arr[0].length > 4) {
- this.sayPriceObj.replies[index].price = Number(arr[0].substring(0, 4) + '.' + arr[1])
- } else if (arr[1].length > 6) {
- this.sayPriceObj.replies[index].price = Number(arr[0] + '.' + arr[1].substring(0, 6))
- }
- }
- },
- onReplyPriceBlur: function (index) {
- let price = this.sayPriceObj.replies[index].price
- if (!price) {
- this.sayPriceObj.replies[index].price = ''
- this.$message.error('价格不能为空')
- this.validSayPrice.repliesPrice = false
- } else if (price <= 0) {
- this.sayPriceObj.replies[index].price = ''
- this.$message.error('输入值必须为正整数')
- this.validSayPrice.repliesPrice = false
- } else {
- this.validSayPrice.repliesPrice = true
- }
- },
- onReplyLapQtyBlur: function (index) {
- let lapQty = this.sayPriceObj.replies[index].lapQty
- let limitDownObj = this.getLimitDownQty()
- if (!lapQty || lapQty < 1) {
- this.sayPriceObj.replies[index].lapQty = ''
- this.$message.error('输入值必须为正整数')
- this.validSayPrice.repliesLapQty = false
- } else if (limitDownObj.index !== index && limitDownObj.lapQty > lapQty) {
- this.$message.error('输入值必须大于#该梯度的下限#')
- this.sayPriceObj.replies[index].lapQty = ''
- this.validSayPrice.repliesLapQty = false
- } else if ((index - 1 >= 0 && this.sayPriceObj.replies[index - 1].lapQty && this.sayPriceObj.replies[index - 1].lapQty >= lapQty) || (index + 1 < this.sayPriceObj.replies.length && this.sayPriceObj.replies[index + 1].lapQty && this.sayPriceObj.replies[index + 1].lapQty <= lapQty)) {
- this.$message.error('输入值会导致梯度重叠,请重新修改')
- this.sayPriceObj.replies[index].lapQty = ''
- this.validSayPrice.repliesLapQty = false
- } else {
- this.validSayPrice.repliesLapQty = true
- }
- },
- getLimitDownQty: function () {
- for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
- if (this.sayPriceObj.replies[i].lapQty) {
- return {
- lapQty: this.sayPriceObj.replies[i].lapQty,
- index: i
- }
- }
- }
- return {index: -1}
- },
- checkValid: function () {
- return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
- },
- // onUnitPriceBlur: function () {
- // if (this.sayPriceObj.unitPrice) {
- // if (this.sayPriceObj.unitPrice <= 0) {
- // this.$message.error('单价必须是大于0的数字')
- // this.validSayPrice.unitPrice = false
- // } else {
- // this.validSayPrice.unitPrice = true
- // }
- // } else {
- // this.$message.error('单价必须是大于0的数字')
- // this.validSayPrice.unitPrice = false
- // }
- // },
- // onUnitPriceChange: function () {
- // let price = this.sayPriceObj.unitPrice
- // if (price >= 10000) {
- // this.sayPriceObj.unitPrice = price.substring(0, 4)
- // } else if (price.indexOf('.') > -1) {
- // let arr = price.split('.')
- // if (arr[0].length > 4) {
- // this.sayPriceObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
- // } else if (arr[1].length > 6) {
- // this.sayPriceObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
- // }
- // }
- // },
- // onMinDayInput: function () {
- // this.sayPriceObj.minDay = Number(this.sayPriceObj.minDay)
- // if (this.sayPriceObj.minDay < 1 || this.sayPriceObj.minDay > 31 || this.sayPriceObj.minDay.toString().indexOf('.') !== -1) {
- // this.validSayPrice.minDay = false
- // this.$message.error('交期只能填写1-31之间的整数值')
- // } else if (this.sayPriceObj.maxDay && this.sayPriceObj.maxDay < this.sayPriceObj.minDay) {
- // this.validSayPrice.minDay = false
- // this.$message.error('最短交期应小于等于最长交期')
- // } else {
- // this.validSayPrice.minDay = true
- // }
- // },
- // onMinDayChange: function () {
- // if (this.sayPriceObj.minDay.length > 2) {
- // this.sayPriceObj.minDay = this.sayPriceObj.minDay.substring(0, 2)
- // }
- // },
- // onMaxDayInput: function () {
- // this.sayPriceObj.maxDay = Number(this.sayPriceObj.maxDay)
- // if (this.sayPriceObj.maxDay < 1 || this.sayPriceObj.maxDay > 31 || this.sayPriceObj.maxDay.toString().indexOf('.') !== -1) {
- // this.validSayPrice.maxDay = false
- // this.$message.error('交期只能填写1-31之间的整数值')
- // } else if (this.sayPriceObj.minDay && this.sayPriceObj.maxDay < this.sayPriceObj.minDay) {
- // this.validSayPrice.maxDay = false
- // this.$message.error('最短交期应小于等于最长交期')
- // } else {
- // this.validSayPrice.maxDay = true
- // }
- // },
- // onMaxDayChange: function () {
- // if (this.sayPriceObj.maxDay.length > 2) {
- // this.sayPriceObj.maxDay = this.sayPriceObj.maxDay.substring(0, 2)
- // }
- // },
- // onProduceDateChange: function () {
- // if (this.sayPriceObj.produceDate && getRealLen(this.sayPriceObj.produceDate) > 12) {
- // this.sayPriceObj.produceDate = cutOutString(this.sayPriceObj.produceDate, 12)
- // }
- // },
- // checkAllSayPrice: function () {
- // return this.validSayPrice.unitPrice && this.validSayPrice.minDay && this.validSayPrice.maxDay
- // },
- searchList: function () {
- this.nowPage = 1
- this.resetList()
- },
- sortListByParam: function (param) {
- if (this.sorting[param]) {
- if (this.sorting[param] === 'ASC') {
- this.$set(this.sorting, param, 'DESC')
- } else {
- this.$delete(this.sorting, param)
- }
- } else {
- this.sorting = {}
- this.$set(this.sorting, param, 'ASC')
- }
- this.nowPage = 1
- this.resetList()
- },
- setReplies: function (type, index) {
- if (type === 'add' && this.sayPriceObj.replies.length < 5) {
- if (this.sayPriceObj.replies[index].lapQty && this.sayPriceObj.replies[index].price) {
- this.sayPriceObj.replies.splice(index + 1, 0, {
- lapQty: '',
- price: ''
- })
- } else {
- this.$message.error('请填完整信息')
- }
- } else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
- this.sayPriceObj.replies.splice(index, 1)
- }
- },
- setLinkBoxIndex: function (index) {
- if (!this.user.logged) {
- this.$router.push('/auth/login?returnUrl=' + window.location.href)
- } else {
- this.linkBoxIndex = index
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .apply-info {
- width: 1190px;
- margin: 0 auto;
- .apply-info-title {
- border-bottom: 1px solid #3975f4;
- >p {
- display: inline-block;
- width: 156px;
- height: 33px;
- line-height: 33px;
- color: #fff;
- background: #3975f4;
- font-size: 18px;
- text-align: center;
- border: {
- top-left-radius: 3px;
- top-right-radius: 3px;
- }
- margin: 0;
- }
- >span {
- color: #999;
- margin-left: 16px;
- }
- >div {
- float: right;
- height: 25px;
- line-height: 25px;
- >input {
- width: 241px;
- height: 25px;
- line-height: 25px;
- font-size: 13px;
- border: {
- top-right-radius: 0;
- bottom-right-radius: 0;
- }
- }
- >span {
- display: inline-block;
- width: 69px;
- color: #fff;
- background: #3975f4;
- text-align: center;
- margin: 0 6px 0 -1px;
- border: {
- top-right-radius: 3px;
- bottom-right-radius: 3px;
- }
- cursor: pointer;
- }
- >a {
- background: #ffa200;
- color: #fff;
- width: 79px;
- border-radius: 3px;
- text-align: center;
- display: inline-block;
- }
- }
- }
- .apply-info-list {
- >p {
- background: #ededed;
- height: 40px;
- line-height: 40px;
- margin: 9px 0 0 0;
- span {
- display: inline-block;
- text-align: center;
- a {
- i {
- color: #333;
- &.active {
- color: #5078cb;
- }
- }
- }
- &:nth-child(1) {
- width: 186px;
- }
- &:nth-child(2) {
- width: 106px;
- }
- &:nth-child(3) {
- width: 200px;
- }
- &:nth-child(4) {
- width: 174px;
- }
- &:nth-child(5) {
- width: 152px;
- }
- &:nth-child(6) {
- width: 158px;
- }
- &:nth-child(7) {
- width: 180px;
- margin-left: 30px;
- }
- }
- }
- >ul {
- margin-bottom: 29px;
- > li {
- position: relative;
- min-height: 67px;
- line-height: 67px;
- border: 1px solid #ededed;
- >div {
- overflow-x: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- display: inline-block;
- text-align: center;
- color: #3c3c3c;
- vertical-align: middle;
- &:nth-child(1) {
- width: 186px;
- }
- &:nth-child(2) {
- width: 106px;
- }
- &:nth-child(3) {
- width: 200px;
- }
- &:nth-child(4) {
- width: 174px;
- }
- &:nth-child(5) {
- width: 152px;
- }
- &:nth-child(6) {
- width: 158px;
- }
- &:nth-child(7) {
- width: 180px;
- margin-left: 32px;
- float: right;
- }
- &.date-content {
- span {
- &:first-child {
- font-size: 12px;
- color: #666;
- }
- color: #f71026;
- }
- i {
- font-style: normal;
- }
- }
- &.number-content {
- span {
- color: #5392f9;
- &.active {
- color: #ff9a00;
- }
- }
- >img {
- margin-bottom: 5px;
- margin-right: 2px;
- }
- }
- &.btn-content {
- > a {
- display: inline-block;
- width: 71px;
- height: 28px;
- line-height: 28px;
- color: #fff;
- background: #3c7cf5;
- border-radius: 3px;
- cursor: pointer;
- &:first-child {
- background: #ffa200;
- float: left;
- margin-top: 19px;
- }
- }
- .is-say-price {
- display: inline-block;
- color: #39ae05;
- margin-left: 11px;
- img {
- margin-bottom: 2px;
- }
- .say-price-history {
- position: absolute;
- top: 53px;
- right: 11px;
- line-height: normal;
- width: 198px;
- height: 0;
- background: #fff;
- border: 1px solid #fab89a;
- z-index: 1;
- overflow: hidden;
- transition: height 1s;
- -moz-transition: height 1s; /* Firefox 4 */
- -webkit-transition: height 1s; /* Safari 和 Chrome */
- -o-transition: height 1s; /* Opera */
- opacity: 0;
- p {
- color: #020202;
- font-weight: bold;
- margin: 0;
- &.price-title {
- background: #fee6db;
- height: 28px;
- line-height: 28px;
- }
- &.price-level {
- margin: 6px 0;
- text-align: left;
- }
- }
- > div {
- padding: 9px 12px;
- > div {
- display: inline-block;
- text-align: left;
- &:nth-child(1) {
- float: left;
- }
- &:nth-child(2) {
- margin-left: 32px;
- }
- span {
- color: #020202;
- margin: 0;
- &.red-text {
- color: #f62d37;
- }
- }
- &.pre-line {
- display: block;
- padding: 13px 0;
- border-bottom: 1px dashed #fee6db;
- }
- }
- ul {
- li {
- color: #333;
- height: 22px;
- line-height: 22px;
- padding: 0 6px;
- &:nth-child(odd) {
- background: #f6f5f4;
- }
- span {
- color: #333;
- display: inline-block;
- text-align: left;
- width: 50%;
- margin: 0;
- }
- &:last-child {
- span {
- color: #4290f7;
- }
- }
- }
- }
- }
- }
- &:hover {
- .say-price-history {
- opacity: 1;
- /* animation: expand 1s infinite;
- -webkit-animation: expand 1s infinite; !*Safari and Chrome*!
- animation-iteration-count: 1;
- -webkit-animation-iteration-count: 1;*/
- height: 210px;
- }
- }
- /* @keyframes expand {
- from {bottom: 58px}
- to {bottom: auto}
- }
- @-webkit-keyframes expand {
- from {bottom: 58px}
- to {bottom: auto}
- }*/
- }
- }
- }
- .expand-content {
- display: none;
- justify-content: space-between;
- padding: 0 236px 0 36px;
- background: #fffbf0;
- height: 45px;
- line-height: 45px;
- color: #020202;
- div {
- display: inline-block;
- span {
- color: #f71026;
- }
- }
- }
- &:hover {
- box-shadow: 1.5px 3px 7px 0 rgb( 178, 178, 179 );
- .expand-content {
- display: flex;
- }
- }
- .say-price {
- background-color: #e7eef9;
- height: 64px;
- line-height: 64px;
- display: none;
- >div {
- display: inline-block;
- position: relative;
- height: 64px;
- line-height: 64px;
- input {
- border-radius: 3px;
- }
- &:nth-child(1) {
- width: 282px;
- background: url('/images/applyPurchase/say-price.png')no-repeat;
- text-align: center;
- margin-right: 44px;
- }
- &:nth-child(2) {
- margin-right: 39px;
- input {
- width: 118px;
- height: 26px;
- border: 1px solid #5392f9;
- }
- select {
- position: absolute;
- top: 19px;
- width: 32px;
- height: 26px;
- background: url('/images/applyPurchase/arrow-down.png')no-repeat right center;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- border: {
- left: none;
- top: none;
- bottom: none;
- right: 1px solid #5392f9;
- bottom-left-radius: 4px;
- top-left-radius: 4px;
- }
- color: #5392f9;
- font: small-caption;
- padding-left: 8px;
- & + input {
- padding-left: 34px;
- }
- }
- div {
- position: absolute;
- top: 19px;
- left: 38px;
- width: 32px;
- height: 26px;
- line-height: 26px;
- text-align: center;
- border: {
- left: none;
- top: none;
- bottom: none;
- right: 1px solid #5392f9;
- bottom-left-radius: 4px;
- top-left-radius: 4px;
- }
- color: #5392f9;
- & + input {
- padding-left: 34px;
- }
- }
- }
- &:nth-child(3) {
- margin-right: 37px;
- input {
- width: 32px;
- height: 26px;
- padding: 0 0 0 6px;
- }
- }
- &:nth-child(4) {
- margin-right: 132px;
- input {
- width: 118px;
- height: 26px;
- }
- }
- &:nth-child(5) {
- span {
- width: 71px;
- height: 28px;
- line-height: 28px;
- text-align: center;
- display: inline-block;
- cursor: pointer;
- &:first-child {
- background: #dedddd;
- margin-right: 10px;
- }
- &:last-child {
- background: #fa4701;
- color: #fff;
- }
- }
- }
- i {
- color: #e41515;
- position: relative;
- top: 2px;
- right: 3px;
- }
- }
- }
- &.active {
- border-color: #f71026;
- box-shadow: none;
- .expand-content {
- display: flex;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- }
- .say-price {
- display: block;
- }
- }
- }
- }
- }
- .page-wrap {
- text-align: right;
- float: none;
- }
- .say-price-box {
- position: fixed;
- width: 456px;
- top: 30%;
- left: 33%;
- /*-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
- /*-moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
- /*box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
- z-index: 1;
- .title {
- position: relative;
- height: 44px;
- background: #4290f7;
- line-height: 44px;
- color: #fff;
- border: {
- top-right-radius: 5px;
- top-left-radius: 5px;
- }
- > div {
- display: inline-block;
- padding-left: 57px;
- width: 47%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- i {
- position: absolute;
- right: 10px;
- top: 8px;
- cursor: pointer;
- }
- }
- .content {
- padding: 9px 0;
- background: #fff;
- .content-line {
- margin: 0 0 14px 0;
- .form-item {
- display: inline-block;
- width: 49%;
- > span {
- i {
- color: #fd2637;
- margin-right: 4px;
- }
- }
- input {
- border: 1px solid #bfbfbf;
- border-radius: 2px;
- height: 28px;
- }
- &.form-left {
- span {
- display: inline-block;
- width: 104px;
- text-align: right;
- }
- input {
- width: 64px;
- }
- }
- &.form-upload {
- text-align: center;
- label {
- margin-bottom: 0;
- cursor: pointer;
- input {
- display: none;
- }
- span {
- display: block;
- width: 94px;
- height: 23px;
- line-height: 18px;
- font-weight: normal;
- color: #4290f7;
- text-align: center;
- border: 1px dashed #4290f7;
- border-radius: 11px;
- i {
- font-weight: bold;
- font-style: normal;
- font-size: 18px;
- margin-right: 5px;
- }
- }
- }
- div {
- i {
- cursor: pointer;
- color: #eb222c;
- font-size: 16px;
- margin-right: 10px;
- }
- span {
- display: inline-block;
- max-width: 128px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- }
- &.form-right {
- padding-left: 13px;
- position: relative;
- input {
- width: 101px;
- }
- select {
- position: absolute;
- top: 0;
- width: 32px;
- height: 28px;
- background: url(/images/applyPurchase/arrow-down.png) no-repeat right center;
- border: {
- left: none;
- top: none;
- bottom: none;
- right: 1px solid #bfbfbf;
- bottom-left-radius: 4px;
- top-left-radius: 4px;
- }
- color: #5392f9;
- font: small-caption;
- padding-left: 8px;
- outline: none;
- & + input {
- padding-left: 36px;
- }
- }
- > i {
- margin-left: 4px;
- }
- }
- }
- }
- }
- .operate {
- background: #fff;
- height: 62px;
- text-align: center;
- padding-top: 15px;
- border: {
- top: 1px solid #e4e5e6;
- bottom-left-radius: 5px;
- bottom-right-radius: 5px;
- }
- span {
- display: inline-block;
- width: 64px;
- height: 28px;
- line-height: 28px;
- text-align: center;
- background: #4290f7;
- color: #fff;
- cursor: pointer;
- &:last-child {
- margin-left: 15px;
- background: #acabab;
- }
- }
- }
- }
- .link-saler-box {
- width: 289px;
- height: auto;
- min-height: auto;
- border-radius: 2px;
- .title {
- background-color: #4290f7;
- height: 22px;
- line-height: 22px;
- margin-bottom: 20px;
- }
- .content {
- p {
- line-height: 20px;
- padding-top: 0;
- i {
- color: #4290f7;
- margin-right: 4px;
- }
- span {
- color: #f62d37;
- }
- }
- div {
- a {
- width: 78px;
- background: #4290f7;
- margin: 18px 0 13px 0;
- border-radius: 2px;
- }
- }
- }
- }
- }
- </style>
|