182 lines
4.3 KiB
Vue
182 lines
4.3 KiB
Vue
<template>
|
|
<view class="wrap">
|
|
<u-sticky offset-top="0" customNavHeight="0">
|
|
<uititle title="我的报价"></uititle>
|
|
</u-sticky>
|
|
<view class="issue" @click="toRelease">
|
|
<u-icon name="plus" color="#fff" size="24"></u-icon>
|
|
</view>
|
|
<view class="layout-goods">
|
|
<view class="goods-box p-top-10" v-if="list.length">
|
|
<view class="item bg-white" @click="detailLink(item.sheetId)" v-for="(item, index) in list"
|
|
:key="index">
|
|
<view class="askfor">查看详情</view>
|
|
<view class="title text-single">{{ item.sheet.title }}</view>
|
|
<view class="text m-top-10">
|
|
<text class="red">{{ typeList[item.sheet.type].label }}</text>
|
|
<text class="red">金额:{{ parseInt(item.totalPrice) }}元</text>
|
|
</view>
|
|
<view class="my-10 text-25 red font-bold">{{ item.status === 0 ? '待选商' : '已被选商' }}</view>
|
|
<view class="my-10 text-25 text-gray" v-if="item.remark">备注:{{ item.remark }}</view>
|
|
<view class="date">{{ item._add_time_str }} 发布</view>
|
|
</view>
|
|
</view>
|
|
<u-empty v-else text="您未报价"></u-empty>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import uititle from '@/components/common/title'
|
|
|
|
export default {
|
|
name: "my",
|
|
components: {uititle},
|
|
data() {
|
|
return {
|
|
list: [],
|
|
userInfo: null,
|
|
typeList: [
|
|
{value: 0, label: '拍卖'},
|
|
{value: 1, label: '采购'},
|
|
{value: 2, label: '租赁'},
|
|
{value: 3, label: '物资回收'},
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
detailLink(sheetId) {
|
|
vk.navigateTo(`/pages/junk/detail?id=${sheetId}`);
|
|
},
|
|
async getList() {
|
|
const {rows} = await vk.callFunction({
|
|
url: 'client/old/kh/getMyQuoteList'
|
|
})
|
|
this.list = rows
|
|
},
|
|
async toRelease() {
|
|
const {userInfo, accountNum} = await vk.callFunction({
|
|
url: 'user/kh/getMyUserInfo'
|
|
})
|
|
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '您尚未认证, 是否前往认证?',
|
|
success: res => {
|
|
if (res.confirm) {
|
|
uni.setStorageSync('user_tab', 0)
|
|
uni.switchTab({url: '/pages/user/user'})
|
|
}
|
|
}
|
|
})
|
|
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '请完善名片信息',
|
|
success: res => {
|
|
if (res.confirm) {
|
|
uni.setStorageSync('user_tab', 1)
|
|
uni.switchTab({url: '/pages/user/user'})
|
|
}
|
|
}
|
|
})
|
|
} else if (accountNum === 0) {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '请先到个人中心添加收款账户',
|
|
success: res => {
|
|
if (res.confirm) {
|
|
uni.setStorageSync('user_tab', 7)
|
|
uni.switchTab({url: '/pages/user/user'})
|
|
}
|
|
}
|
|
})
|
|
} else {
|
|
vk.navigateTo({
|
|
url: '/pages/old/publish'
|
|
})
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
|
this.getList()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.layout-goods {
|
|
// width: 690rpx;
|
|
padding: 10rpx 30rpx;
|
|
|
|
.item {
|
|
position: relative;
|
|
margin-top: 10rpx;
|
|
padding: 10rpx 20rpx 20rpx;
|
|
border-radius: 12rpx;
|
|
|
|
.title {
|
|
width: 90%;
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
line-height: 48rpx;
|
|
color: #101010;
|
|
}
|
|
|
|
.link, .askfor {
|
|
position: absolute;
|
|
right: 20rpx;
|
|
top: 16rpx;
|
|
z-index: 9;
|
|
font-size: 24rpx;
|
|
line-height: 36rpx;
|
|
color: #A92924;
|
|
padding: 4rpx 8rpx;
|
|
}
|
|
|
|
.link {
|
|
border: 1px solid #A92924;
|
|
}
|
|
|
|
.text {
|
|
font-size: 24rpx;
|
|
line-height: 36rpx;
|
|
color: #999999;
|
|
}
|
|
|
|
.red {
|
|
margin-right: 20rpx;
|
|
color: #A92924;
|
|
}
|
|
|
|
.date {
|
|
font-size: 24rpx;
|
|
line-height: 36rpx;
|
|
color: #9a9a9a;
|
|
}
|
|
|
|
.company {
|
|
height: 40rpx;
|
|
|
|
.icon {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
}
|
|
|
|
.text {
|
|
//width: 300rpx;
|
|
height: 40rpx;
|
|
font-size: 26rpx;
|
|
line-height: 40rpx;
|
|
color: #4f4f4f;
|
|
}
|
|
}
|
|
}
|
|
|
|
.item:nth-child(1) {
|
|
margin-top: 0 !important;
|
|
}
|
|
}
|
|
</style> |