| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426 |
- <template>
- <div class="apply-info">
- <div class="apply-info-title">
- <p>最新求购信息</p>
- <span>海量求购,一网打尽</span>
- <div>
- <input type="text" class="form-control" placeholder="请输入要查找的内容" />
- <span>查询</span>
- <a>展开筛选</a>
- </div>
- </div>
- <div class="apply-info-list">
- <p>
- <span>发布时间<img src="/images/applyPurchase/sort-arrow.png" alt=""></span>
- <span>买家</span>
- <span>型号</span>
- <span>品牌</span>
- <span>截止时间<img src="/images/applyPurchase/sort-arrow.png" alt=""></span>
- <span>已报价<img src="/images/applyPurchase/sort-arrow.png" alt=""></span>
- <span>操作</span>
- </p>
- <ul>
- <li v-for="purchaseMan in purchaseManList.content" :class="{'active': purchaseMan.active}">
- <span>{{purchaseMan.releaseDate | date}}</span>
- <span>{{purchaseMan.tel | phone}}</span>
- <span>{{purchaseMan.code}}</span>
- <span>{{purchaseMan.brand}}</span>
- <span class="date-content"><span>剩余 </span><span v-text="getDay(purchaseMan.deadline - purchaseMan.releaseDate)"></span> 天 <span v-text="getHours(purchaseMan.deadline - purchaseMan.releaseDate)"></span> 小时</span>
- <span class="number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10"><span :style="purchaseMan.offerAmount > 10 ? 'color: #ff9a00': ''">{{purchaseMan.amount || 0}}</span> 条</span>
- <span class="btn-content">
- <a>联系买家</a>
- <a @click="sayPrice(purchaseMan)">我要报价</a>
- </span>
- <div class="expand-content">
- <div>
- 生产日期:{{purchaseMan.produceDate}}
- </div>
- <div>
- 封装:{{purchaseMan.encapsulation}}
- </div>
- <div>
- 采购数量:<span>{{purchaseMan.amount}}</span>个
- </div>
- <div>
- 单价预算:<span>¥{{purchaseMan.unitPrice}}</span>
- </div>
- </div>
- <div class="say-price">
- <div>报价</div>
- <div>
- <i>*</i>单价
- <select>
- <option value="RMB">$</option>
- <option value="USD">¥</option>
- </select>
- <input type="text" class="form-control">
- </div>
- <div>
- <i>*</i>交期
- <input type="text" class="form-control"> - <input type="text" class="form-control"> 天
- </div>
- <div>
- 生产日期 <input type="text" class="form-control">
- </div>
- <div>
- <span @click="cancelSayPrice(purchaseMan)">取消</span>
- <span>提交</span>
- </div>
- </div>
- </li>
- </ul>
- </div>
- <page :total="totalCount" :page-size="pageSize"
- :current="nowPage" v-on:childEvent="listenPage"></page>
- </div>
- </template>
- <script>
- import Page from '~components/common/page/pageComponent.vue'
- export default {
- data () {
- return {
- pageSize: 10,
- nowPage: 1
- }
- },
- components: {
- Page
- },
- 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
- }
- },
- methods: {
- getDay: function (timeStamp) {
- return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
- },
- getHours: function (timeStamp) {
- return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
- },
- listenPage: function (page) {
- this.nowPage = page
- this.$store.dispatch('applyPurchase/loadPurchaseManList', {page: this.nowPage, count: this.pageSize})
- },
- sayPrice: function (purchaseMan) {
- purchaseMan.active = true
- },
- cancelSayPrice: function (purchaseMan) {
- purchaseMan.active = false
- }
- }
- }
- </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;
- img {
- width: 15px;
- height: 14px;
- margin: 0 0 3px 5px;
- }
- &:nth-child(1) {
- width: 186px;
- }
- &:nth-child(2) {
- width: 160px;
- }
- &:nth-child(3) {
- width: 173px;
- }
- &:nth-child(4) {
- width: 147px;
- }
- &:nth-child(5) {
- width: 152px;
- }
- &:nth-child(6) {
- width: 158px;
- }
- &:nth-child(7) {
- width: 214px;
- }
- }
- }
- >ul {
- margin-bottom: 29px;
- li {
- min-height: 67px;
- line-height: 67px;
- border: 1px solid #ededed;
- >span {
- overflow: 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: 160px;
- }
- &:nth-child(3) {
- width: 173px;
- }
- &:nth-child(4) {
- width: 147px;
- }
- &:nth-child(5) {
- width: 152px;
- }
- &:nth-child(6) {
- width: 158px;
- }
- &:nth-child(7) {
- width: 212px;
- }
- &.date-content {
- span {
- &:first-child {
- font-size: 12px;
- color: #666;
- }
- color: #f71026;
- }
- }
- &.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;
- margin-right: 10px;
- }
- }
- }
- }
- .expand-content {
- display: none;
- justify-content: space-between;
- padding: 0 236px 0 36px;
- background: #fffbf0;
- box-shadow: 1.5px 3px 7px 0 rgb( 178, 178, 179 );
- div {
- display: inline-block;
- span {
- color: #f71026;
- }
- }
- }
- &:hover {
- .expand-content {
- display: flex;
- }
- }
- .say-price {
- background-color: #e7eef9;
- display: none;
- >div {
- display: inline-block;
- position: relative;
- height: 64px;
- line-height: 64px;
- &: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;
- & + input {
- padding-left: 34px;
- }
- }
- }
- &:nth-child(3) {
- margin-right: 37px;
- input {
- width: 32px;
- height: 26px;
- }
- }
- &: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;
- .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;
- }
- }
- </style>
|