This commit is contained in:
2026-10-08 18:34:09 +08:00
commit 2933904f4c
905 changed files with 112129 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
<template>
<u-popup :show="show" @close="close" @open="handlePopupOpen" mode="center" round="15">
<view style="height: 80vh; overflow-y: auto;width: 80vw" class="p-20">
<u-parse :content="agreement"/>
</view>
<u-button shape="circle" @click="close">关闭</u-button>
</u-popup>
</template>
<script>
export default {
name: "agreement",
data() {
return {
agreement: '',
show: false,
readTimer: null,
readCompleted: false,
}
},
methods: {
open() {
this.getAgreement()
},
handlePopupOpen() {
this.startReadTimer()
},
startReadTimer() {
this.clearReadTimer()
if (this.readCompleted) return
this.readTimer = setTimeout(() => {
this.readTimer = null
this.readCompleted = true
this.$emit('read-complete')
}, 5000)
},
clearReadTimer() {
if (this.readTimer) {
clearTimeout(this.readTimer)
this.readTimer = null
}
},
close() {
this.clearReadTimer()
this.show = false
},
async getAgreement() {
const res = await vk.callFunction({
url: 'client/dict/pub/getDetail',
data: {
id: '65885d5b862066f18a4e4a36'
},
})
this.agreement = res.content
this.show = true
},
},
beforeDestroy() {
this.clearReadTimer()
},
mounted() {
},
}
</script>
+262
View File
@@ -0,0 +1,262 @@
<template>
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uititle title="提交报价"></uititle>
</u-sticky>
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="old" :id="formData.sheetId"/>
<view class="layout layout-title m-top-20">填写报价信息</view>
<view class="layout layout-publish m-top-20 bg-white">
<view class="card-title m-top-30">报价信息</view>
<view class="group flex align-center m-top-30">
<view class="lb need m-right-20">总价(人民币:元):</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
border="surround"
v-model="formData.totalPrice"
suffixIcon="元"
suffixIconStyle="font-size: 24rpx;color: #909399"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">报价单详情:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入报价单详情"
border="surround"
v-model="formData.remark"
suffixIconStyle="font-size: 24rpx;color: #909399"
></u--input>
</view>
</view>
<view class="card-title m-top-30">附件信息</view>
<view class="group m-top-20">
<view class="lb need m-right-20">附件内容:</view>
<view class="flex justify-between align-center m-top-20">
<view class="lbx flex-1">仅支持纵向PDF文档,报价附件将生成标准合同附件,请认真审阅。</view>
<!-- <view class="download">报价单样板下载</view>-->
</view>
<view class="m-top-30">
<u-upload
accept="file"
:fileList="formData.files"
@afterRead="afterRead"
@delete="deletePic"
name="1"
multiple
:maxCount="10"
></u-upload>
</view>
</view>
<u-button class="public-btn m-top-30" text="提交报价" @click="addCoop"></u-button>
</view>
</view>
</template>
<script>
import uititle from '@/components/common/title'
import dayjs from "dayjs";
import QuoteRemainNum from "@/components/quote-remain-num/quote-remain-num.vue";
import md5 from "js-md5";
export default {
components: {
QuoteRemainNum,
uititle,
},
data() {
return {
current: 0,
radioEnum: [
{value: 0, name: '是',},
{value: 0, name: '否',}
],
formData: {
sheetId: null,
totalPrice: null,
files: [],
remark: '',
},
reloaded: false,
sheet: null,
};
},
methods: {
getDetail() {
this.reloaded = false
vk.callFunction({
url: 'client/old/pub/getDetail',
title: '请求中...',
data: {
id: this.formData.sheetId
},
success: (res) => {
this.sheet = res
this.reloaded = true
}
}).catch(err => {
if (err.code === -1) {
setTimeout(() => {
vk.navigateBack()
}, 1500)
}
})
},
addCoop() {
if (!this.formData.totalPrice) return this.$message.error('请填写金额')
if (this.formData.files.length === 0) return this.$message.error('请上传报价附件')
if (this.formData.files.length > 0) this.formData.files = this.formData.files.map(item => item.url)
vk.callFunction({
url: 'client/old/kh/addQuote',
data: this.formData
})
this.$message.success('提交成功')
uni.navigateBack()
},
afterRead({file}) {
for (let i = 0; i < file.length; i++) {
const item = file[i]
if (item.type !== 'application/pdf') {
uni.showToast({
title: '请上传PDF文件',
icon: 'none'
})
return
}
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + '.pdf',
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.formData.files.push({
url: res.fileList[0].tempFileURL,
name: item.name
})
})
}
})
}
},
deletePic({index}) {
this.formData.files.splice(index, 1)
},
},
onLoad({id}) {
this.formData.sheetId = id
this.getDetail()
},
onShow() {
this.reloaded = false
setTimeout(() => {
this.reloaded = true
}, 500)
}
}
</script>
<style lang="scss">
.layout-title {
padding: 20rpx 30rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 44rpx;
color: #A92924;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 26rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 4rpx;
height: 28rpx;
background: #A92924;
}
}
.public-btn {
width: 80%;
margin-top: 60rpx;
color: #ffffff;
background: #A92924;
}
.layout-publish {
margin: 20rpx 30rpx;
padding: 50rpx 30rpx;
border-radius: 18rpx;
}
.tag-title {
font-size: 26rpx;
line-height: 40rpx;
color: #000000;
.limit {
font-size: 24rpx;
color: #999999;
}
}
.tag-box {
padding: 20rpx 0;
.item {
padding: 6rpx 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #555555;
}
.active {
color: #A92924;
}
}
.lb, .fix {
position: relative;
font-size: 26rpx;
line-height: 40rpx;
color: #666666;
}
.lbx {
font-size: 24rpx;
color: #999999;
}
.download {
padding: 8rpx 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
border: 1px solid #A92924;
}
.need::before {
position: absolute;
left: -16rpx;
top: 50%;
z-index: 9;
margin-top: -12rpx;
content: '*';
color: #A92924;
font-size: 32rpx;
line-height: 1;
}
</style>
+659
View File
@@ -0,0 +1,659 @@
<template> <!-- 现货详情 -->
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uiheader></uiheader>
</u-sticky>
<!-- 内容 -->
<view class="layout layout-detail" v-if="sheet">
<view class="company flex m-top-20">
<view class="info flex-1 p-left-20">
<view class="font-bold">
{{ sheet.supplier.companyName ? sheet.supplier.companyName : sheet.supplier.personalName }}
</view>
<view class="zhu">
{{ sheet._add_time_str }} 发布
</view>
</view>
</view>
<view class="card-title m-top-30">物资信息</view>
<view class="detail m-top-20">
<view class="detail-title">
<text>{{ sheet.title }}</text>
<text class="text-main" v-if="sheet.isUrgent">[加急]</text>
</view>
<view class="m-top-20">
<file-type v-for="(item, index) in sheet.files" :key="index" :item="item"/>
</view>
<view class="detail-text">物资分类:{{ sheet.category[1] }}</view>
<view class="detail-text" v-if="sheet.addressRegion && sheet.addressRegion.city">
物资所在地:{{ sheet.addressRegion.province.name }}{{
sheet.addressRegion.city.name
}}{{ sheet.addressRegion.area.name }}{{ sheet.addressDetail }}
</view>
<view class="detail-text" v-if="[1, 2].includes(sheet.type) && sheet.deliverAddressRegion.city">
{{
sheet.type === 2 ? (sheet.rentType === 0 ? '物资交货地' : '物资装货地') : '物资交货地'
}}:{{ sheet.deliverAddressRegion.province.name }}{{
sheet.deliverAddressRegion.city.name
}}{{ sheet.deliverAddressRegion.area.name }}{{ sheet.deliverAddressDetail }}
</view>
<view class="detail-text">详情:{{ sheet.desc ? sheet.desc : '无' }}</view>
<template v-if="sheet.type === 0">
<view class="detail-text">起拍计价单位:{{
sheet.startNum ? sheet.startNum : ''
}}{{ sheet.unit ? sheet.unit : '' }}
</view>
<view class="detail-text">起拍人民币单价:{{
sheet.startAmount ? `${sheet.startAmount}元` : ''
}}
</view>
<view class="detail-text">拍卖信息失效时间:{{ sheet.expiredTime ? sheet.expiredTime : '' }}</view>
</template>
</view>
<view v-if="[0, 1, 2].includes(sheet.type)">
<view class="card-title m-top-30">合同条款</view>
<view class="detail m-top-20">
<view class="detail-text">是否含税:{{ sheet.invoice ? '含税' : '不含税' }}</view>
<template v-if="sheet.invoice">
<view class="detail-text" v-if="sheet.invoiceOther">税票要求:{{ sheet.invoiceOther }}</view>
<template v-else>
<view class="detail-text">
开票时间:{{ sheet.writeInvoiceTime ? sheet.writeInvoiceTime : '无' }}
</view>
<view class="detail-text">
纳税人身份:{{ sheet.taxType ? sheet.taxType : '无' }}
</view>
<view class="detail-text">
发票种类:{{ sheet.invoiceType ? sheet.invoiceType : '无' }}
</view>
<view class="detail-text">
税率:{{ sheet.taxRate ? sheet.taxRate : '无' }}
</view>
</template>
</template>
<view class="detail-text">报价明细:{{ sheet.invoiceDetail ? sheet.invoiceDetail : '无' }}</view>
</view>
</view>
<template v-if="sheet.type !== 3">
<view class="card-title m-top-30">交易说明</view>
<view class="detail m-top-20">
<view class="mt-15 detail-text">报价区域:{{
sheet.offerAddressNoLimit ? '不限区域' :
(sheet.offerAddressRegion && sheet.offerAddressRegion.province) ? `${sheet.offerAddressRegion.province.name} ${sheet.offerAddressRegion.city ? sheet.offerAddressRegion.city.name : ''} ${sheet.offerAddressRegion.area ? sheet.offerAddressRegion.area.name : '无'}` : '无'
}}
</view>
<view class="mt-15 detail-text" v-if="sheet.payMethod">付款方式:{{ sheet.payMethod }}{{
sheet.payMethod === '预付' ? `${sheet.prePayRate}%,货到付全款` : ''
}}
</view>
<view class="mt-15 detail-text" v-if="sheet.payMethod === '其他付款方式描述'">{{
sheet.otherPayMethodDesc
}}
</view>
<!-- <view class="mt-15">报价形式:{{ sheet.offerType === 0 ? '整单报价' : '可分项报价' }}</view>-->
</view>
</template>
<template v-if="sheet.type === 1">
<view class="item-wrap">
<view class="card-title m-top-30">采购商信息</view>
<template v-if="sheet.isMine || sheet.hasQuote || userInfo.userLevel > 0">
<template v-if="sheet.user && sheet.user.accountType === 2">
<view class="mt-15" v-if="sheet.buyer.companyName">公司信息:{{
sheet.buyer.companyName ? sheet.buyer.companyName : ''
}}
</view>
<view class="mt-15" v-if="sheet.buyer.contract">公司联系方式:{{
sheet.buyer.contract ? sheet.buyer.contract : ''
}}
</view>
</template>
<template v-else>
<view class="mt-15" v-if="sheet.buyer.personalName">个人信息:{{
sheet.buyer.personalName ? sheet.buyer.personalName : ''
}}
</view>
<view class="mt-15" v-if="sheet.buyer.personalContract">个人联系方式:{{
sheet.buyer.personalContract ? sheet.buyer.personalContract : ''
}}
</view>
</template>
<view class="mt-15" v-if="sheet.buyer.managerName">授权人姓名:{{
sheet.buyer.managerName ? sheet.buyer.managerName : ''
}}
</view>
<view class="mt-15" v-if="sheet.buyer.managerContract">授权联系方式:{{
sheet.buyer.managerContract ? sheet.buyer.managerContract : ''
}}
</view>
</template>
<template v-else>
<template v-if="sheet.user && sheet.user.accountType === 2">
<view class="mt-15" v-if="sheet.buyer.companyName">公司信息:{{
sheet.buyer.companyName ? sheet.buyer.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
}}
</view>
<view class="mt-15" v-if="sheet.buyer.contract">公司联系方式:{{
sheet.buyer.contract ? sheet.buyer.contract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
<template v-else>
<view class="mt-15" v-if="sheet.buyer.personalName">个人信息:{{
sheet.buyer.personalName ? sheet.buyer.personalName.replace(/^(.).*(.)$/, "$1***$2") : ''
}}
</view>
<view class="mt-15" v-if="sheet.buyer.personalContract">个人联系方式:{{
sheet.buyer.personalContract ? sheet.buyer.personalContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
<view class="mt-15" v-if="sheet.buyer.managerName">授权人姓名:{{
sheet.buyer.managerName ? sheet.buyer.managerName.replace(/^(.).*(.)$/, "$1***$2") : ''
}}
</view>
<view class="mt-15" v-if="sheet.buyer.managerContract">授权联系方式:{{
sheet.buyer.managerContract ? sheet.buyer.managerContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
</view>
</template>
<template v-else>
<view class="item-wrap">
<view class="card-title m-top-30">{{ sheet.type === 3 ? '回收单位信息' : '供货商信息' }}</view>
<template v-if="sheet.isMine || sheet.hasQuote || userInfo.userLevel > 0">
<template v-if="sheet.user && sheet.user.accountType === 2">
<view class="mt-15" v-if="sheet.supplier.companyName">公司信息:{{
sheet.supplier.companyName ? sheet.supplier.companyName : ''
}}
</view>
<view class="mt-15" v-if="sheet.supplier.contract">公司联系方式:{{
sheet.supplier.contract ? sheet.supplier.contract : ''
}}
</view>
</template>
<template v-else>
<view class="mt-15" v-if="sheet.supplier.personalName">个人信息:{{
sheet.supplier.personalName ? sheet.supplier.personalName : ''
}}
</view>
<view class="mt-15" v-if="sheet.supplier.personalContract">
个人联系方式:{{
sheet.supplier.personalContract ? sheet.supplier.personalContract : ''
}}
</view>
</template>
<view class="mt-15" v-if="sheet.supplier.managerName">授权人姓名:{{
sheet.supplier.managerName ? sheet.supplier.managerName : ''
}}
</view>
<view class="mt-15" v-if="sheet.supplier.managerContract">授权联系方式:{{
sheet.supplier.managerContract ? sheet.supplier.managerContract : ''
}}
</view>
</template>
<template v-else>
<template v-if="sheet.user && sheet.user.accountType === 2">
<view class="mt-15" v-if="sheet.supplier.companyName">公司信息:{{
sheet.supplier.companyName ? sheet.supplier.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
}}
</view>
<view class="mt-15" v-if="sheet.supplier.contract">公司联系方式:{{
sheet.supplier.contract ? sheet.supplier.contract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
<template v-else>
<view class="mt-15" v-if="sheet.supplier.personalName">个人信息:{{
sheet.supplier.personalName ? sheet.supplier.personalName.replace(/^(.).*(.)$/, "$1***$2") : ''
}}
</view>
<view class="mt-15" v-if="sheet.supplier.personalContract">
个人联系方式:{{
sheet.supplier.personalContract ? sheet.supplier.personalContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
<view class="mt-15" v-if="sheet.supplier.managerName">授权人姓名:{{
sheet.supplier.managerName ? sheet.supplier.managerName.replace(/^(.).*(.)$/, "$1***$2") : ''
}}
</view>
<view class="mt-15" v-if="sheet.supplier.managerContract">授权联系方式:{{
sheet.supplier.managerContract ? sheet.supplier.managerContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
}}
</view>
</template>
</view>
</template>
<view v-if="sheet.signMethod === 0" style="line-height: 32rpx">
<view class="card-title m-top-30">合同条款</view>
<view class="detail m-top-20 text-25">
<view class="mt-15">违约责任:</view>
<view class="mt-15">
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
</view>
<view class="mt-15">解决纠纷的方法:</view>
<view class="mt-15">
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
</view>
<view class="mt-15">不可抗力:</view>
<view class="mt-15">
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
</view>
<view class="mt-15">其他:</view>
<view class="mt-15">
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
</view>
<view class="mt-15">采购方补充条款: {{ sheet.supplementary }}</view>
</view>
</view>
<!-- <view class="card-title m-top-30">已收到的合作申请</view>-->
<!-- <view class="table-box m-top-30">-->
<!-- <view class="thead">-->
<!-- <view class="tr">-->
<!-- <view class="th">企业</view>-->
<!-- <view class="th">申请人</view>-->
<!-- <view class="th">联系方式</view>-->
<!-- <view class="th">合作留言</view>-->
<!-- <view class="th">申请时间</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="tbody" v-if="sheet">-->
<!-- <view class="tr" v-for="(item, index) in sheet.quoteList" :key="index">-->
<!-- <view class="td">-->
<!-- <text v-if="item.user">{{-->
<!-- item.user.accountType === 2 ? item.user.company.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : item.user.person.personName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6")-->
<!-- }}-->
<!-- </text>-->
<!-- </view>-->
<!-- <view class="td">{{ item.name }}</view>-->
<!-- <view class="td">{{ item.mobile }}</view>-->
<!-- <view class="td">{{ item.remark }}</view>-->
<!-- <view class="td">{{ item._add_time_str }}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
<!-- 底部 -->
<view class="fiexd-bottom flex justify-between align-center bg-white" v-if="sheet && sheet.type < 3">
<u-icon name="integral" color="#A92924" size="26"></u-icon>
<view class="text red flex-1 m-left-20">{{ sheet.quoteList.length }}家已报价</view>
<view class="apply-btn" @click="toCooperate" v-if="userInfo._id !== sheet.uid && sheet.status === 0 ">
{{ sheet.type === 3 ? '我要询价' : '我要报价' }}
</view>
<view class="apply-btn" @click="isPopup = true" v-else-if="userInfo._id === sheet.uid">收到的报价申请
</view>
</view>
<!-- 弹出窗 -->
<u-popup :show="isPopup" mode="center" @close="isPopup = false" @open="open" :custom-style="{width: '100%'}">
<view class="popup-box" v-if="isPopup">
<view class="popup-title flex justify-between align-center">
<view class="title">收到的合作申请列表</view>
<view class="close" @click="isPopup = false">关闭</view>
</view>
<view class="py-20 border-bottom text-25" v-for="(item, index) in sheet.quoteList" :key="index">
<view class="flex justify-start items-center mb-20">
<text class="mr-10">报价方:</text>
<text>{{ item.subjectName }}</text>
</view>
<view class="flex justify-start items-center mb-20">
<text class="mr-10">报价时间:</text>
<text>{{ item._add_time_str }}</text>
</view>
<view class="flex justify-start items-center mb-20">
<text class="mr-10">联系方式:</text>
<text>{{ item.user.mobile }}</text>
</view>
<view class="flex justify-start items-center mb-20">
<text class="mr-10">报价:</text>
<text>{{ item.totalPrice }}元</text>
</view>
<view class="flex justify-start items-center mb-20">
<text class="mr-10">详情:</text>
<text>{{ item.remark }}</text>
</view>
<view class="flex justify-start items-center mb-20">
<text class="mr-10">附件:</text>
<template v-if="item.files.length > 0">
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
@click.native="openDownload(file)"/>
</template>
<text v-else>无</text>
</view>
<u-button v-if="sheet.status === 0 && sheet.type !== 3"
size="mini" type="error" text="选择" style="width: 60rpx;"
@click="confirmQuote(item._id)"
></u-button>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import uiheader from '@/components/index/header'
import dayjs from 'dayjs';
import {INVOICE_TYPE, WRITE_INVOICE_TIME} from "../../util";
import FileType from "@/components/file-type/file-type.vue";
export default {
components: {
FileType,
uiheader,
},
data() {
return {
isPopup: false,
sheet: null,
allChildCate: [],
userInfo: null
};
},
methods: {
INVOICE_TYPE() {
return INVOICE_TYPE
},
WRITE_INVOICE_TIME() {
return WRITE_INVOICE_TIME
},
getCategoryTreeData(id) {
vk.callFunction({
url: 'client/spot/category/pub/getTree',
title: '请求中...',
data: {},
success: (data) => {
this.allChildCate = []
data.rows.forEach(item => {
item.children.forEach(child => {
this.allChildCate.push(child)
})
})
this.getInfo(id)
}
});
},
applyLink() {
uni.$u.route('/pages/goods/apply', {
id: 0,
});
},
getDetail() {
vk.callFunction({
url: 'client/old/pub/getDetail',
title: '请求中...',
data: {
id: this.id
},
success: (res) => {
this.sheet = res
this.sheet.address = ''
this.sheet.deliverAddress = ''
this.sheet.offerAddress = ''
if (this.sheet.addressRegion && this.sheet.addressRegion.length > 0)
this.sheet.address = this.sheet?.addressRegion[0]?.name + this.sheet?.addressRegion[1]?.name + this.sheet?.addressRegion[2]?.name + this.sheet.addressDetail
if (this.sheet.deliverAddress && this.sheet.deliverAddress.length > 0)
this.sheet.deliverAddress = this.sheet?.deliverAddressRegion[0]?.name + this.sheet?.deliverAddressRegion[1]?.name + this.sheet?.deliverAddressRegion[2]?.name + this.sheet.addressDetail
if (this.sheet.offerAddress && this.sheet.offerAddress.length > 0)
this.sheet.offerAddress = !this.sheet.offerAddressNoLimit ? (this.sheet?.offerAddressRegion[0]?.name + this.sheet?.offerAddressRegion[1]?.name + this.sheet?.offerAddressRegion[2]?.name) : '无限制'
this.sheet.expiredTime = dayjs(this.sheet.expiredTime).format('YYYY-MM-DD')
}
});
},
async toCooperate() {
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/junk/apply?id=${this.sheet._id}&userId=${this.sheet.userId}`});
}
},
async confirmQuote(quoteId) {
await vk.callFunction({
url: 'client/old/kh/confirmQuote',
title: '请求中...',
data: {
quoteId,
}
});
this.showDialog = false
this.$message({
message: "选择成功",
type: 'success'
})
if (this.sheet.signMethod === 0) vk.navigateTo('/pages/public/contract?tab=1')
else {
if (this.sheet.signMethod === 1) vk.navigateTo('/pages/user/seller?menuIndex=2')
else vk.navigateTo('/pages/public/contract')
}
},
openDownload(url) {
window.location.href = url
// window.open(url)
}
},
onLoad({id}) {
this.id = id
this.userInfo = vk.getStorageSync('uni_id_user_info')
this.getDetail()
}
}
</script>
<style lang="scss">
page {
padding-bottom: 150rpx;
background: #ffffff;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 6rpx;
height: 28rpx;
background: #A92924;
}
.more {
font-size: 24rpx;
font-weight: normal;
color: #999999;
}
}
.layout-detail {
padding: 20rpx 30rpx;
}
.company {
padding-bottom: 40rpx;
border-bottom: 1px solid #f2f2f2;
.logo {
width: 120rpx;
height: 120rpx;
}
.name-text {
max-width: 380rpx;
font-size: 30rpx;
font-weight: 600;
line-height: 40rpx;
color: #333333;
}
.name-icon {
width: 80rpx;
height: 32rpx;
}
.zhu {
margin-top: 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #999999;
}
}
.detail-title {
font-size: 26rpx;
font-weight: 600;
line-height: 40rpx;
color: #101010;
}
.detail-text {
margin-top: 10rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #999999;
}
.fiexd-bottom {
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
height: 130rpx;
padding: 0 30rpx;
box-sizing: border-box;
border-top: 1px solid #f2f2f2;
.text {
font-size: 26rpx;
line-height: 40rpx;
}
.apply-btn {
width: 220rpx;
height: 70rpx;
font-size: 26rpx;
line-height: 70rpx;
text-align: center;
color: #ffffff;
background: #A92924;
}
}
.table-box {
font-size: 24rpx;
line-height: 28rpx;
text-align: center;
}
.tr {
display: flex;
justify-content: space-between;
align-items: center;
}
.th {
color: #666 !important;
background: #FFF8F2;
}
.th, .td {
display: flex;
justify-content: center;
align-items: center;
width: 50%;
height: 76rpx;
color: #999;
overflow: hidden;
box-sizing: border-box;
border-left: 1px solid #f2f2f2;
border-right: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2;
}
.td {
border-right: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2;
background: #ffffff;
}
.td-3 {
width: 33.33%;
}
.popup-box {
padding: 20rpx 20rpx;
}
.popup-title {
padding: 18rpx 0;
border-bottom: 1px solid #A92924;
.title {
font-size: 24rpx;
line-height: 40rpx;
color: #A92924;
}
.close {
width: 80rpx;
height: 40rpx;
font-size: 22rpx;
line-height: 40rpx;
text-align: center;
color: #ffffff;
background: #A92924;
}
}
.item-wrap {
margin-top: 10rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #999999;
}
</style>
+523
View File
@@ -0,0 +1,523 @@
<template> <!-- 旧货交易 -->
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uiheader title="旧货交易"></uiheader>
<!-- 搜索栏 -->
<cmsearch :k="keyword" @search="afterSearch"></cmsearch>
</u-sticky>
<!-- 轮播图-传值:list="数组" -->
<cmswiper page="old" height="320rpx"></cmswiper>
<!-- 四个入口 -->
<view class="bg-white p-20 flex justify-center items-center">
<view class="flex-1 mx-20">
<u-button type="primary" shape="circle" size="mini" @click="toRelease">发布旧货</u-button>
</view>
<view class="flex-1 mx-20">
<u-button type="primary" shape="circle" size="mini" plain @click="toMyEnquiry">我发布的</u-button>
</view>
<view class="flex-1 mx-20">
<u-button type="primary" shape="circle" size="mini" plain @click="toMyQuote">我的报价</u-button>
</view>
</view>
<cmfourth></cmfourth>
<!-- 加急公告 -->
<view class="layout layout-notice bg-white flex justify-start align-center">
<view class="notice-left">
<view>加急</view>
<view>公告</view>
</view>
<view class="notice-right m-left-30">
<swiper class="swiper-box" vertical="true" :autoplay="true" :interval="3000" :duration="1000"
next-margin="48rpx">
<swiper-item class="swiper-item" v-for="(item, index) in urgentList" :key="index"
@click="$jump(`/pages/junk/detail?id=${item._id}`)">
<view class="swiper-item">
<view class="city" v-if="item.addressRegion && item.addressRegion.city">[{{
item.addressRegion.city.name
}}]
</view>
<template v-else>
<view class="city" v-if="item.deliverAddressRegion && item.deliverAddressRegion.city">[{{
item.deliverAddressRegion.city.name
}}]
</view>
</template>
<view class="text text-single">{{ item.title }}</view>
<view class="date">{{ dayjs(item._add_time_str).format('MM-DD') }}</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
<!-- 最新拍卖消息 -->
<view class="layout layout-list">
<view class="list-h2">
<view class="big">最新拍卖消息</view>
<view class="more" @click="listLink(0)">更多></view>
</view>
<view class="list-box m-top-10">
<view class="li text-single" v-for="(item, index) in dataList[0]" :key="index"
v-if="item.addressRegion && item.addressRegion.city "
@click="$jump(`/pages/junk/detail?id=${item._id}`)">
<text>【{{ item.addressRegion.city.name }}】</text>
<text class="text-main" v-if="item.isUrgent">[加急]</text>
{{ item.title }}
</view>
</view>
</view>
<!-- 最新采购消息 -->
<view class="layout layout-list">
<view class="list-h2">
<view class="big">最新采购消息</view>
<view class="more" @click="listLink(1)">更多></view>
</view>
<view class="list-box m-top-10">
<view class="li text-single" v-for="(item, index) in dataList[1]" :key="index"
v-if="item.deliverAddressRegion && item.deliverAddressRegion.city "
@click="$jump(`/pages/junk/detail?id=${item._id}`)">
<text>【{{ item.deliverAddressRegion.city.name }}】</text>
<text class="text-main" v-if="item.isUrgent">[加急]</text>
{{ item.title }}
</view>
</view>
</view>
<!-- 列表-最新租赁消息 -->
<view class="layout layout-list">
<view class="list-h2">
<view class="big red">最新租赁消息</view>
<view class="more" @click="listLink(2)">更多></view>
</view>
<view class="list-box m-top-10">
<view class="li text-single" v-for="(item, index) in dataList[2]" :key="index"
@click="$jump(`/pages/junk/detail?id=${item._id}`)">
<text v-if="item.addressRegion && item.addressRegion.city">【{{ item.addressRegion.city.name }}】</text>
<template v-else>
<text v-if="item.deliverAddressRegion && item.deliverAddressRegion.city">【{{ item.deliverAddressRegion.city.name }}】</text>
</template>
<text class="text-main" v-if="item.isUrgent">[加急]</text>
{{ item.title }}
</view>
</view>
</view>
<!-- 列表-最新物资回收消息 -->
<view class="layout layout-list">
<view class="list-h2">
<view class="big red">最新物资回收消息</view>
<view class="more" @click="listLink(3)">更多></view>
</view>
<view class="list-box m-top-10">
<view class="li text-single" v-for="(item, index) in dataList[3]" :key="index"
v-if="item.addressRegion && item.addressRegion.city "
@click="$jump(`/pages/junk/detail?id=${item._id}`)">
<text>【{{ item.addressRegion.city.name }}】</text>
<text class="text-main" v-if="item.isUrgent">[加急]</text>
{{ item.title }}
</view>
</view>
</view>
<!-- 品牌推荐 -->
<view class="layout layout-brand bg-white">
<view class="brand-img flex justify-center p-top-20">
<image class="img" src="/static/img/brand.png" mode=""></image>
</view>
<view class="brand-box flex justify-between flex-wrap">
<view class="item" v-for="(item, index) in companyList" :key="index"
@click="$jump(`/pages/yellow/detail?id=${item.uid}`)">
<view class="flex flex-col justify-start items-start ml-10" style="width: 290rpx">
<view class="text text-24 flex-1 u-line-1">{{ item.company.companyName }}</view>
<view class="main m-top-10 u-line-1">
主营:{{
(item.mainSpotCategory && item.mainSpotCategory.length > 0) ? item.mainSpotCategory.join() : (item.company.mainSpotCategorySelf || '')
}}
</view>
</view>
</view>
</view>
</view>
<!-- <view v-if="showMore" class="more-btns">-->
<!-- <view class="item" @click="toMyQuote">-->
<!-- <u-icon name="order" color="#A92924" size="24"></u-icon>-->
<!-- </view>-->
<!-- <view class="item" @click="toMyEnquiry">-->
<!-- <u-icon name="account" color="#A92924" size="24"></u-icon>-->
<!-- </view>-->
<!-- <view class="item" @click="toRelease">-->
<!-- <u-icon name="plus" color="#A92924" size="24"></u-icon>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="issue" @click="showMore = !showMore">-->
<!-- <u-icon :name="showMore ? 'close' : 'plus'" color="#fff" size="24"></u-icon>-->
<!-- </view>-->
<collapse></collapse>
</view>
</template>
<script>
import uiheader from '@/components/index/header'
import cmsearch from '@/components/common/search'
import cmempty from '@/components/common/empty'
import cmfourth from '@/components/common/fourth'
import cmswiper from '@/components/common/swiper'
import dayjs from 'dayjs'
import Collapse from "@/components/index/collapse.vue";
import {FactoryBuilding} from "@icon-park/vue";
export default {
components: {
FactoryBuilding,
Collapse,
uiheader,
cmsearch,
cmempty,
cmfourth,
cmswiper,
},
data() {
return {
companyList: [],
dataList: [],
urgentList: [],
allChildCate: [],
keyword: '',
showMore: false
};
},
methods: {
dayjs,
toMyEnquiry() {
vk.navigateTo({
url: '/pages/junk/my'
})
},
toMyQuote() {
vk.navigateTo({
url: '/pages/junk/myQuote'
})
},
listLink(type) {
vk.navigateTo(`/pages/junk/list?type=${type}`);
},
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/junk/publish'
})
}
},
async getInfo(id) {
this.info = await vk.callFunction({
url: 'client/goods/list/pub/getDetail',
data: {
id
}
})
},
getCategoryTreeData() {
vk.callFunction({
url: 'client/spot/category/pub/getTree',
title: '请求中...',
data: {},
success: (data) => {
this.allChildCate = []
data.rows.forEach(item => {
item.children.forEach(child => {
this.allChildCate.push(child)
})
})
this.getCompanyList()
}
});
},
async getCompanyList() {
const {rows} = await vk.callFunction({
url: 'client/user/pub/getCompany',
data: {isCoop: 1}
})
this.companyList = rows.map(item => {
item.name = item.company.companyName
item.mainSpotCategory = []
if (item.company && item.company.mainSpotCategoryIds) {
this.allChildCate.forEach(child => {
if (item.company.mainSpotCategoryIds.includes(child._id)) {
item.mainSpotCategory.push(child.name)
}
})
}
return item
})
},
afterSearch(keyword) {
this.keyword = keyword
this.getDataList()
},
async getDataList() {
for (let i = 0; i < 4; i++) {
const {rows} = await vk.callFunction({
url: 'client/old/pub/getList',
data: {
type: i,
keyword: this.keyword
}
})
this.dataList[i] = rows.map(item => {
item.addDate = dayjs(item._add_time).format('MM-DD')
return item
})
this.$forceUpdate()
}
},
async getUrgentList() {
const {rows} = await vk.callFunction({
url: 'client/old/pub/getList',
data: {
isUrgent: true
}
})
this.urgentList = rows.map(item => {
item.addDate = dayjs(item._add_time).format('MM-DD')
return item
})
console.log(this.urgentList)
}
},
onLoad(option) {
if (option.keyword) this.keyword = option.keyword
this.getCategoryTreeData()
this.getDataList()
this.getUrgentList()
}
}
</script>
<style lang="scss">
page {
background: #F8F8F8;
}
.layout-notice {
margin: 20rpx 30rpx;
padding: 20rpx 20rpx;
.notice-left {
width: 80rpx;
height: 100%;
font-size: 28rpx;
font-weight: 600;
line-height: 32rpx;
color: #A92924;
border-right: 1px solid #f2f2f2;
}
.notice-right {
width: 550rpx;
height: auto;
}
.swiper-box {
width: 100%;
height: 96rpx;
}
.swiper-item {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
height: 48rpx !important;
overflow: hidden;
font-size: 24rpx;
line-height: 48rpx;
color: #999999;
.text {
margin: 0 10rpx;
max-width: 300rpx;
color: #333333;
}
}
}
.layout-banner {
padding: 0rpx 30rpx;
.banner {
margin-top: 20rpx;
width: 100%;
height: 126rpx;
}
}
.layout-brand {
margin: 30rpx 30rpx 10rpx;
.brand-img {
.img {
width: 174rpx;
height: 58rpx;
}
}
}
.brand-box {
padding: 10rpx;
.item {
position: relative;
width: 50%;
height: 136rpx;
//padding: 10rpx;
box-sizing: border-box;
border-bottom: 1px solid #f2f2f2;
display: flex;
align-items: center;
justify-content: center;
.main {
height: 36rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
}
.company {
width: 64rpx;
//height: 64rpx;
.icon {
width: 64rpx;
height: 64rpx;
}
.text {
font-size: 25rpx;
font-weight: 600;
line-height: 48rpx;
color: #101010;
}
}
}
.item:nth-child(2n+1) {
border-right: 1px solid #f2f2f2;
}
.item:nth-last-child(-n+2) {
border-bottom: none;
}
}
.layout-list {
margin: 20rpx 30rpx 10rpx;
border-radius: 12rpx;
.list-h2 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0rpx;
.big {
font-size: 28rpx;
line-height: 48rpx;
color: #000000;
}
.more {
font-size: 26rpx;
line-height: 40rpx;
color: #A92924;
}
.red {
color: #A92924 !important;
}
}
.list-box {
padding: 20rpx 20rpx;
background: #FFFDFD;
border-radius: 20rpx;
.li {
position: relative;
width: 100%;
height: 48rpx;
font-size: 24rpx;
line-height: 48rpx;
color: #6c6c6c;
text-indent: 1em;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
content: '';
margin-top: -2px;
width: 4px;
height: 4px;
background: #A92924;
border-radius: 50%;
}
}
}
}
.more-btns {
position: fixed;
right: 30rpx;
bottom: 220rpx;
z-index: 99;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 90rpx;
border-radius: 999rpx;
background: white;
border: 1px solid #A92924;
.item {
margin: 20rpx 0;
}
}
</style>
+506
View File
@@ -0,0 +1,506 @@
<template> <!-- 旧货详情 -->
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<!-- 顶部 -->
<uiheader></uiheader>
<!-- 搜索栏 -->
<cmsearch></cmsearch>
</u-sticky>
<!-- 四个入口 -->
<view class="bg-white">
<cmfourth :type="type"/>
</view>
<!-- 选择器 -->
<view class="layout-pick flex justify-between align-center bg-white">
<view class="flex justify-start">
<view class="ip down" @click="isPick = true">分类:{{ pickValue }}</view>
<view class="ip down ml-35" @click="showRentType = true" v-if="type === 2">{{ rentTypeStr }}</view>
</view>
<view class="ip down" @click="showAddress">省份:{{ locationValue }}</view>
</view>
<view class="layout layout-detail">
<template v-if="type === 0">
<uiswiper :ad="15" padding="10rpx 0"></uiswiper>
<uiswiper :ad="16" padding="10rpx 0"></uiswiper>
</template>
<template v-if="type === 1">
<uiswiper :ad="17" padding="10rpx 0"></uiswiper>
<uiswiper :ad="18" padding="10rpx 0"></uiswiper>
</template>
<template v-if="type === 2">
<uiswiper :ad="19" padding="10rpx 0"></uiswiper>
<uiswiper :ad="20" padding="10rpx 0"></uiswiper>
</template>
<template v-if="type === 3">
<uiswiper :ad="21" padding="10rpx 0"></uiswiper>
<uiswiper :ad="22" padding="10rpx 0"></uiswiper>
</template>
<view class="item flex flex-col " v-for="(item, index) in goodsData.rows" :key="index">
<!-- <view class="img">-->
<!-- <image class="full" src="/static/img/abc-1.png" mode=""></image>-->
<!-- </view>-->
<view class="info flex-1 p-left-30" @click="$jump(`/pages/junk/detail?id=${item._id}`)">
<view class="title text-single">
<text>{{ item.title }}</text>
<text class="text-main" v-if="item.isUrgent">[加急]</text>
</view>
<view class="flex justify-start items-start flex-col">
<view class="p half">
<text class="lb">企业</text>
<text v-if="![0, 2, 3].includes(item.type) ">
{{ item.buyer.companyName ? item.buyer.companyName : '无' }}
</text>
<text v-else>{{ item.supplier.companyName ? item.supplier.companyName : '无' }}</text>
</view>
<view class="p half">
<text class="lb">所属分类</text>
{{ item.category[1] }}
</view>
<view class="p">
<text class="lb">所在区域</text>
{{ item.addressStr }}
</view>
<view class="flex justify-between items-center">
<view class="p half">
<text class="lb">发布时间</text>
{{ item._add_time_str }}
</view>
<view class="p half">
<text class="lb">有效期至</text>
{{ item.expiredTime }}
</view>
</view>
</view>
</view>
<view class="buttons">
<button class="btn" plain @click="doShowContract(index)">查看电话
</button>
<button class="btn green" plain @click="doShowWechat(index)">添加微信
</button>
<button class="btn" plain @click="$jump(`/pages/junk/detail?id=${item._id}`)"
v-if="item.type !== 2">
{{ item.uid === userInfo._id ? '查看报价' : '我要报价' }}
</button>
<button class="btn" plain @click="$jump(`/pages/junk/detail?id=${item._id}`)"
v-else-if="item.type === 2 && item.rentType === 0">
{{ item.uid === userInfo._id ? '查看报价' : '我要报价' }}
</button>
<view class="wechat"
v-if="item.user && parseInt(item.user.accountType) === 2 && item.user.businessCard && item.user.businessCard.companyWechat && item.showWechat">
<el-image :src="item.user.businessCard.companyWechat" style="width: 100%; height: 100%"/>
</view>
<view class="wechat"
v-if="item.user && parseInt(item.user.accountType) === 1 && item.user.businessCard && item.user.businessCard.personalWechat && item.showWechat">
<el-image :src="item.user.businessCard.personalWechat" style="width: 100%; height: 100%"/>
</view>
<view class="mobile" v-if="item.user && item.showContract && item.user.businessCard">
<i class="el-icon-phone"></i>
<text class="ml-20" v-if="item.buyer && item.buyer.managerContract">{{ item.buyer.managerContract }}</text>
<text class="ml-20" v-else-if="item.supplier && item.supplier.managerContract">
{{ item.supplier.managerContract }}
</text>
</view>
</view>
</view>
</view>
<u-empty mode="list" text="暂无更多内容~" v-if="goodsData.rows.length === 0"></u-empty>
<!-- 悬浮按钮 -->
<view class="issue" @click="toRelease">
<u-icon name="plus" color="#fff" size="24"></u-icon>
</view>
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
<u-picker v-if="isPick" :show="isPick" :columns="[categoryTreeData, categoryTreeData[cateIndex[0]].children]"
key-name="name" @confirm="handConfirmPick" @change="handleChangeCate" @cancel="isPick = false">
<template #more>
<text @click="resetCate">重置</text>
<text @click="otherCate" class="ml-20">其他</text>
</template>
</u-picker>
<u-picker v-if="showRentType" :show="showRentType"
:columns="[[{name: '承租信息', value: 0}, {name: '出租信息', value: 1}], ]"
key-name="name" @confirm="handConfirmRentType" @cancel="showRentType = false">
</u-picker>
<collapse></collapse>
</view>
</template>
<script>
import uiheader from '@/components/index/header'
import cmsearch from '@/components/common/search'
import cmempty from '@/components/common/empty'
import cmfourth from '@/components/common/fourth'
import dayjs from 'dayjs'
import Collapse from "@/components/index/collapse.vue";
import AddressSelect from "@/components/AddressSelect.vue";
import uiswiper from "@/components/index/swiper.vue";
export default {
components: {
uiswiper,
AddressSelect, Collapse,
uiheader,
cmsearch,
cmempty,
cmfourth,
},
data() {
return {
type: 1,
pageSize: 500,
keyword: '',
checkProvinceList: [],
checkCategoryList: [],
goodsData: {
total: 0,
rows: []
},
oldType: [
'拍卖信息',
'采购信息',
'承租信息',
'物资回收信息',
],
categoryTreeData: [],
allChildCate: [],
locationValue: '全国',
pickValue: '全部',
isPick: false,
cateId: null,
cateIndex: [0, 0],
region: {
province: {
code: null,
name: null,
}
},
userInfo: null,
rentType: 0,
rentTypeStr: '承租信息',
showRentType: false
};
},
methods: {
handleChangeCate({indexs}) {
this.cateIndex = indexs
},
handConfirmPick({value}) {
this.pickValue = value[1].name
this.cateId = value[1]._id
this.isPick = false
this.search(1)
},
handConfirmRentType({value}) {
this.rentType = value[0].value
this.rentTypeStr = value[0].name
this.showRentType = false
this.search(1)
},
resetCate() {
this.cateIndex = [0, 0]
this.pickValue = '全部'
this.cateId = null
this.isPick = false
this.search(1)
},
otherCate() {
this.cateIndex = [0]
this.pickValue = '其他'
this.cateId = 0
this.isPick = false
this.search(1)
},
showAddress() {
this.$refs.AddressSelect.open(this.region, 1, true);
},
regionConfirm({province}) {
this.region = {province}
this.locationValue = `${province.name}`
this.search(1)
},
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 {
if (userInfo.businessCard.status !== 1) {
uni.showModal({
title: '提示',
content: '您的名片信息未审核,请耐心等待',
})
return
}
vk.navigateTo({
url: '/pages/junk/publish'
})
}
},
async toMy() {
const {
userInfo
} = 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 {
vk.navigateTo({
url: '/pages/junk/my'
})
}
},
search(pageIndex) {
// const categoryIds = []
// this.allChildCate.map(item => {
// if (this.checkCategoryList.indexOf(item._id) > -1) categoryIds.push(item.name)
// })
vk.callFunction({
url: 'client/old/pub/getList',
title: '加载中...',
data: {
pageIndex,
pageSize: this.pageSize,
keyword: this.keyword,
type: this.type,
categoryIds: this.cateId !== null ? [this.cateId] : null,
provinceCodes: this.region.province.code ? [this.region.province.code] : null,
rentType: this.rentType
},
success: (data) => {
data.rows.map(item => {
if (item.type === 1) item.addressStr = (item.deliverAddressRegion && item.deliverAddressRegion.city) ? (item.deliverAddressRegion.province.name + "-" + item.deliverAddressRegion.city.name) : ''
else {
if (item.type === 2) {
if (item.addressRegion && item.addressRegion.city) {
item.addressStr = (item.addressRegion && item.addressRegion.city) ? (item.addressRegion.province.name + "-" + item.addressRegion.city.name) : ''
} else {
if (item.deliverAddressRegion && item.deliverAddressRegion.city) {
item.addressStr = (item.deliverAddressRegion && item.deliverAddressRegion.city) ? (item.deliverAddressRegion.province.name + "-" + item.deliverAddressRegion.city.name) : ''
}
}
}else {
item.addressStr = (item.addressRegion && item.addressRegion.city) ? (item.addressRegion.province.name + "-" + item.addressRegion.city.name) : (item.deliverAddressRegion.province.name + "-" + item.deliverAddressRegion.city.name)
}
}
item.expiredTime = item.expiredTime ? dayjs(item.expiredTime).format('YYYY-MM-DD') : ''
item.showWechat = false
item.showContract = false
return item
})
this.goodsData = data
}
});
},
doShowWechat(index) {
if (parseInt(this.goodsData.rows[index].user.accountType) === 2 && !this.goodsData.rows[index].user.businessCard.companyWechat)
return vk.toast('用户暂未上传')
else if (parseInt(this.goodsData.rows[index].user.accountType) === 1 && !this.goodsData.rows[index].user.businessCard.personalWechat)
return vk.toast('用户暂未上传')
this.goodsData.rows[index].showContract = false
this.goodsData.rows[index].showWechat = !this.goodsData.rows[index].showWechat
},
doShowContract(index) {
this.goodsData.rows[index].showWechat = false
this.goodsData.rows[index].showContract = !this.goodsData.rows[index].showContract
}
},
onLoad(option) {
this.userInfo = vk.getStorageSync('uni_id_user_info')
if (option.type) {
this.type = parseInt(option.type)
this.search(1)
vk.callFunction({
url: 'client/old/pub/getTree',
title: '请求中...',
data: {type: parseInt(this.type)},
success: (data) => {
this.categoryTreeData = data.rows
this.allChildCate = []
this.categoryTreeData.forEach(item => {
item.children.forEach(child => {
this.allChildCate.push(child)
})
})
}
});
} else uni.navigateBack()
},
}
</script>
<style lang="scss">
.layout-pick {
width: 690rpx;
height: 68rpx;
padding: 0 30rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #4F4F4F;
.ip {
position: relative;
//max-width: 33.333%;
height: 40rpx;
padding-right: 30rpx;
overflow: hidden;
box-sizing: border-box;
}
.down::after {
position: absolute;
right: 10rpx;
top: 50%;
z-index: 9;
content: '';
margin-top: -6rpx;
width: 0;
height: 0;
border-left: 10rpx solid transparent;
border-right: 10rpx solid transparent;
border-top: 12rpx solid #999999;
}
}
.layout-detail {
padding: 30rpx 30rpx;
.item {
margin-top: 30rpx;
padding: 30rpx 30rpx;
background: #ffffff;
&:nth-child(1) {
margin-top: 0;
}
.img {
width: 160rpx;
height: 130rpx;
}
.title {
font-size: 28rpx;
font-weight: 600;
line-height: 40rpx;
color: #4b4b4b;
}
.p {
padding: 5rpx 0;
height: 40rpx;
overflow: hidden;
font-size: 24rpx;
line-height: 40rpx;
color: #4b4b4b;
}
.lb {
padding-right: 6rpx;
color: #999999;
}
}
}
.buttons {
margin-top: 20rpx;
padding: 0 20rpx;
display: flex;
justify-content: flex-end;
align-items: center;
position: relative;
.btn {
height: 60rpx;
font-size: 25rpx;
width: 220rpx;
margin: 0 10rpx;
}
.green {
background-color: #7ec050 !important;
color: #ffffff;
}
.wechat {
position: absolute;
left: 240rpx;
top: -200rpx;
width: 150rpx;
height: 150rpx;
background-color: white;
border-radius: 10rpx;
padding: 5rpx;
box-shadow: 0 1px 10px 0 #eee
}
.mobile {
position: absolute;
left: -12rpx;
top: -60rpx;
background-color: white;
border-radius: 10rpx;
padding: 5rpx;
box-shadow: 0 1px 10rpx 0 #aaa;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
+208
View File
@@ -0,0 +1,208 @@
<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" v-for="(item, index) in list"
:key="index">
<view @click="detailLink(item._id)" class="askfor">查看详情</view>
<view @click="detailLink(item._id)" class="title text-single">{{ item.title }}</view>
<view class="text m-top-10">{{ typeList[item.type].label }}</view>
<view @click="detailLink(item._id)" class="text m-top-10">
<text class="red" v-if="item.addressRegion && item.addressRegion.province">
所在地:{{ item.addressRegion.province.name }} {{ item.addressRegion.city.name }} {{
item.addressRegion.area.name
}}
</text>
<text class="red">{{ item.quoteNum }}家已报价</text>
</view>
<text @click="detailLink(item._id)" class="text-25 text-gray" v-if="item.remark">备注:{{ item.remark }}</text>
<view @click="detailLink(item._id)" class="date">{{ item._add_time_str }} 发布</view>
<view>
<u-button type="primary" plain size="mini" @click="del(item._id)">删除</u-button>
</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(id) {
vk.navigateTo(`/pages/junk/detail?id=${id}`);
},
async getList() {
const {rows} = await vk.callFunction({
url: 'client/old/kh/getList'
})
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/junk/publish'
})
}
},
del(_id) {
uni.showModal({
title: '提示',
content: '如果你要删除此条信息,之前其他客户填写的留言将无法查看',
success: res => {
if (res.confirm) {
vk.callFunction({
url: 'client/old/kh/delete',
title: '请求中...',
data: {
_id
},
}).then(res => {
this.getList()
})
}
}
})
}
},
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: 30rpx;
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>
+182
View File
@@ -0,0 +1,182 @@
<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>
+147
View File
@@ -0,0 +1,147 @@
<template>
<view class="wrap">
<!-- 吸顶 -->
<u-sticky offset-top="0" customNavHeight="0">
<uititle title="发布旧货信息"></uititle>
</u-sticky>
<u-tabs :list="tabList" @click="click"></u-tabs>
<view class="layout layout-publish m-top-10 bg-white p-30" v-if="user && pass">
<type_0 :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" v-if="activeIndex === 0"
:buyOldNumAmount="buyOldNumAmount" :user="user" :unit-list="unitList"
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
<type_1 :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" v-if="activeIndex === 1"
:buyOldNumAmount="buyOldNumAmount" :user="user"
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
<type_2 :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" v-if="activeIndex === 2"
:buyOldNumAmount="buyOldNumAmount" :user="user"
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
<type_3 :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" :user="user" v-if="activeIndex === 3"
:buyOldNumAmount="buyOldNumAmount" :contactList="contactList"/>
</view>
</view>
</template>
<script>
import uititle from "@/components/common/title.vue";
import Type_0 from "./release/type_0.vue";
import Type_1 from "./release/type_1.vue";
import Type_2 from "./release/type_2.vue";
import Type_3 from "./release/type_3.vue";
import {getUserLevelLabel} from "@/util";
export default {
name: "publish",
components: {uititle, Type_3, Type_2, Type_1, Type_0},
data() {
return {
tabList: [{
name: '拍卖信息发布',
}, {
name: '采购信息发布',
}, {
name: '租赁信息发布'
}, {
name: '物资回收信息发布'
}],
activeIndex: 0,
urgentAmount: 1,
remainOldNum: 0,
buyOldNumAmount: 5,
agreement: '',
commonContractUrl: '',
contactList: [],
unitList: [],
user: null,
pass: false,
}
},
methods: {
click({index}) {
this.activeIndex = index
},
async getContactList() {
const {rows} = await vk.callFunction({
url: 'client/businessContact/kh/getList',
})
this.contactList = rows
if (!this.contactList.length) {
return uni.showModal({
title: '提示',
content: '您还未添加联系人,请先添加联系人',
showCancel: false,
success: res => {
if (res.confirm) {
uni.setStorageSync('user_tab', 8)
uni.switchTab({url: '/pages/user/user'})
}
}
})
}
this.pass = true
},
async getUrgentAmount() {
const res = await vk.callFunction({
url: 'client/dict/pub/getDetail',
data: {
id: '6587dd2fe0ec19027452c5b5'
},
})
this.urgentAmount = res.content
},
async getBuyOldAmount() {
const res = await vk.callFunction({
url: 'client/dict/pub/getDetail',
data: {
id: '6587dd54189f86d49b3d5ff5'
},
})
this.buyOldNumAmount = res.content
},
async getUserInfo() {
const {userInfo} = await vk.userCenter.getCurrentUserInfo()
this.remainOldNum = userInfo.remainOldNum ? parseInt(userInfo.remainOldNum) : 0
this.user = userInfo
console.log(this.user)
},
async getUnitList() {
const res = await vk.callFunction({
url: 'client/dict/pub/getDetail',
data: {
id: 'a45325976635f10600341a7f2f472cd1'
},
})
this.unitList = res.content.split(',')
},
},
async onShow() {
vk.userCenter.getCurrentUserInfo({
success: (data) => {
this.remainOldNum = data.userInfo.remainOldNum ? parseInt(data.userInfo.remainOldNum) : 0
if (this.remainOldNum === 0) {
this.$confirm('您的旧货发布次数已用完,是否立即购买?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const {data} = await vk.callFunction({
url: 'client/old/kh/buyNum',
})
vk.navigateTo({
url: `/pages/shop/pay?id=${data}`
})
}).catch(() => {
vk.navigateBack()
})
}
}
});
await this.getUserInfo()
await this.getContactList()
await this.getUrgentAmount()
await this.getBuyOldAmount()
// await this.getAgreement()
await this.getUnitList()
},
}
</script>
+950
View File
@@ -0,0 +1,950 @@
<template>
<view class="flex flex-col justify-start items-start">
<text class="text-50">发布我的拍卖信息</text>
<text class="text-gray">拍卖信息越完整,成功交易越容易</text>
<view class="layout w-100p m-top-10">
<view class="goods-item half flex align-center flex-wrap w-100p">
<text class="need text-red">*</text>
<view class="lb">物资分类:</view>
<view class="vl flex-1 p-right-20" @click="openPicker">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="cateName"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<el-checkbox label="其他分类" v-model="form.otherCate" class="mx-20"></el-checkbox>
<u--input
placeholder="请选择"
v-model="form.otherCateName"
fontSize="24rpx"
:disabled="!form.otherCate"
@change="setOther"
></u--input>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">信息标题:</view>
<view class="vl flex-1 p-right-20">
<u--input
placeholder="一句话简介物资,如拍卖直缝钢管200吨等"
v-model="form.title"
fontSize="24rpx"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">采购物资详情:</view>
<view class="vl flex-1 p-right-20">
<u--textarea
placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
v-model="form.desc"
fontSize="24rpx"
></u--textarea>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">拍卖实物:</view>
<view class="vl flex-1 p-right-20">
<u-upload
multiple
:fileList="files"
@afterRead="afterRead"
@delete="deletePic"
width="120rpx"
height="120rpx"
></u-upload>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">物资所在地:</view>
<view class="vl flex-1 p-right-20" @click="showAddress">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="region"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">物资详细地址:</view>
<view class="vl flex-1 p-right-20">
<u--input placeholder="请输入物资详细地址" v-model="form.addressDetail"></u--input>
</view>
</view>
<!-- <view class="goods-item half flex align-center flex-wrap mt-20 w-100p">-->
<!-- <view class="lb">起拍数:</view>-->
<!-- <view class="vl flex-1 p-right-20">-->
<!-- <u&#45;&#45;input placeholder="请选择" v-model="form.startNum"></u&#45;&#45;input>-->
<!-- </view>-->
<!-- </view>-->
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">起拍计价单位:</view>
<view class="vl flex-1 p-right-20" @click="showUnit = true">
<u--input placeholder="请输入起拍计价单位" v-model="form.unit" style="pointer-events:none"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">起拍人民币单价:</view>
<view class="vl flex-1 p-right-20">
<u--input placeholder="请输入内容" v-model="form.startAmount"></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">拍卖信息失效时间:</view>
<view class="vl flex-1 p-right-20" @click="showExpire = true">
<u--input placeholder="请选择" v-model="form.expiredTime" style="pointer-events:none"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"></u--input>
</view>
</view>
<view class="expire-tip">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</view>
<view class="card-title m-top-30">发票要求</view>
<view class="flex justify-start align-center m-top-30">
<u-radio-group v-model="form.invoice" placement="row">
<u-radio activeColor="red" :name='true' label="含税" :customStyle="{marginRight: '30px'}"></u-radio>
<u-radio activeColor="red" :name='false' label="不含税"></u-radio>
</u-radio-group>
</view>
<template v-if="form.invoice">
<view class="group flex m-top-30">
<view class="lb m-right-20">开票时间:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.writeInvoiceTime" placement="column">
<u-radio activeColor="red" :name='0' label="付款当月(限20号之后付款次月开票)"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" :name='1' label="付款后次月"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" :name='2' label="付款前"></u-radio>
</u-radio-group>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">纳税人身份:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.taxType" placement="column">
<u-radio activeColor="red" name='一般纳税人' label="一般纳税人"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='小规模公司' label="小规模公司"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='个体工商户' label="个体工商户"></u-radio>
</u-radio-group>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">发票种类:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.invoiceType" placement="column">
<u-radio activeColor="red" name='专用发票' label="专用发票"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='普通发票' label="普通发票"
:customStyle="{marginBottom: '10px'}"></u-radio>
</u-radio-group>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">税率:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.taxRate" placement="column">
<u-radio activeColor="red" v-for="(item, index) in ['13%', '9%', '6%', '4%', '3%', '1%']"
:key="index" :name='item' :label="item"
:customStyle="{marginBottom: '10px'}"/>
</u-radio-group>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">手动填写税票要求:</view>
<view class="vl flex-1">
<u--input
placeholder="如:一般纳税人 专用发票 税率13%"
border="surround"
v-model="form.invoiceOther"
></u--input>
</view>
</view>
</template>
<view class="card-title m-top-30">交易说明</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">报价区域:</view>
<view class="vl flex-1 p-right-20" @click="showOfferAddress">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="offerRegion"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
<el-checkbox v-model="form.offerAddressNoLimit" @change="changeOfferAddressNoLimit">不限区域
</el-checkbox>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">付款方式:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.payMethod" placement="column">
<!-- <u-radio activeColor="red" name='预付' label="预付N%,货到付全款"-->
<!-- :customStyle="{marginBottom: '10px'}"></u-radio>-->
<u-radio activeColor="red" name='预付'
:customStyle="{marginBottom: '10px'}">
<view class="text-25 flex justify-start items-center">
<text>预付</text>
<u-input v-model="form.prePayRate" :disabled="form.payMethod !== '预付'"
:custom-style="{width: '100rpx'}"></u-input>
<text>%,货到付全款</text>
</view>
</u-radio>
<u-radio activeColor="red" name='提货付全款' label="提货付全款"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='其他付款方式描述'
:customStyle="{marginBottom: '10px'}">
<view class="flex justify-start items-start flex-col w-100p">
<text style="color: rgb(96, 98, 102);
font-size: 15px;
line-height: 15px;">其他付款方式描述
</text>
<u--textarea v-model="form.otherPayMethodDesc" :disabled="form.payMethod !== '其他付款方式描述'"
placeholder="请输入内容" :custom-style="{width: '400rpx'}"/>
</view>
</u-radio>
</u-radio-group>
</view>
</view>
<!-- <view class="group flex align-center m-top-30" v-if="form.payMethod === '预付'">-->
<!-- <view class="lb m-right-20">预付(%):</view>-->
<!-- <view class="vl flex-1">-->
<!-- <u&#45;&#45;input-->
<!-- placeholder="请输入内容"-->
<!-- v-model="form.prePayRate"-->
<!-- ></u&#45;&#45;input>-->
<!-- </view>-->
<!-- </view>-->
<view class="card-title m-top-30">合同条款</view>
<view class="flex justify-start align-center m-top-30">
<u-radio-group v-model="form.signMethod" placement="column">
<u-radio activeColor="red" :name='0' label="线上签约-标准合同"
:customStyle="{marginBottom: '30rpx'}"></u-radio>
<u-radio activeColor="red" :name='2' label="线上签约-双方协商合同"
:customStyle="{marginBottom: '30rpx'}"></u-radio>
<u-radio activeColor="red" :name='1' label="线下签约"
:customStyle="{marginBottom: '30rpx'}"></u-radio>
</u-radio-group>
</view>
<template v-if="form.signMethod === 2">
<view class="card-title m-top-30">合同附件</view>
<u-upload
accept="file"
:fileList="contractAttachment"
@afterRead="afterReadAttachment($event, 'contractAttachment')"
@delete="deletePicAttachment($event, 'contractAttachment')"
name="contractAttachment"
multiple
:maxCount="10"
></u-upload>
</template>
<view v-if="form.signMethod === 0" class="text-25" style="line-height: 32rpx">
<view v-if="form.signMethod === 0" class="mb-15">补充条款</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">违约责任:</view>
<view class="pl-20 flex-1 py-20">
1.
乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;
2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">解决纠纷的方法:</view>
<view class="pl-20 flex-1 py-20">
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工费和获取证据产生费用等其他相关费用。
2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">不可抗力:</view>
<view class="pl-20 flex-1 py-20">
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">其他:</view>
<view class="pl-20 flex-1 py-20">
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="lb m-right-20">销售方补充条款:</view>
<view class="vl w-100p">
<u--textarea
placeholder="请输入内容"
v-model="form.supplementary"
></u--textarea>
</view>
</view>
</view>
<view class="card-title m-top-30">供货商信息</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司信息' : '个人信息' }}:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
v-model="form.supplier.companyName"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司联系方式' : '个人联系方式' }}:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
v-model="form.supplier.contract"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系人:</view>
<view class="vl flex-1" @click="showContactPicker = true">
<u--input
style="pointer-events:none"
readonly
placeholder="点击选择联系人"
v-model="form.supplier.managerName"
suffixIcon="arrow-right"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系方式:</view>
<view class="vl flex-1">
<u--input
disabled
placeholder="请输入内容"
v-model="form.supplier.managerContract"
></u--input>
</view>
</view>
</view>
<view class="mt-20 flex justify-start items-center">
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
<el-radio label="是" v-model="checked">
<text>是</text>
</el-radio>
<el-radio label="否" v-model="checked">
<text>否</text>
</el-radio>
</view>
<view class="mt-20 flex justify-start items-center">
<text class="mr-25">是否加急({{ urgentAmount }}元/次):</text>
<el-radio :label="true" v-model="form.isUrgent">
<text>是</text>
</el-radio>
<el-radio :label="false" v-model="form.isUrgent">
<text>否</text>
</el-radio>
</view>
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
<view class="flex justify-start items-center text-25">
<el-checkbox :value="agree" active-color="#A92924" @change="handleAgreementCheck">我已阅读并同意</el-checkbox>
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
</view>
<view class="flex justify-center items-center mt-30 m-a w-100p">
<view class="flex-1 mx-15">
<u-button type="primary" @click="save" plain="">暂存</u-button>
</view>
<view class="flex-1 mx-15">
<u-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</u-button>
</view>
</view>
<u-picker v-if="showPicker" :show="showPicker" :columns="[cateData, cateData[cateDataIndex].children]"
keyName="name" @change="changeCate"
@cancel="showPicker = false" @close="showPicker = false" closeOnClickOverlay
@confirm="confirmCate"></u-picker>
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
<AddressSelect ref="OfferAddressSelect" @confirm="offerRegionConfirm"/>
<u-picker :show="showUnit" :columns="[unitList]"
@cancel="showUnit = false" @close="showUnit = false" closeOnClickOverlay
@confirm="confirmUnit"></u-picker>
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="date" @cancel="showExpire = false"
:minDate="minDate" :maxDate="maxDate"
@confirm="handConfirmDate"></u-datetime-picker>
<u-picker :show="showContactPicker" :columns="[contactList]" keyName="name"
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
@confirm="confirmContact"></u-picker>
<agreement ref="agreementRef" @read-complete="onAgreementReadComplete"/>
</view>
</template>
<script>
import AddressSelect from "@/components/AddressSelect.vue";
import dayjs from "dayjs";
import md5 from "js-md5";
import Agreement from "@/pages/junk/agreement.vue";
export default {
name: "type_0",
components: {Agreement, AddressSelect},
props: {
urgentAmount: {
type: Number,
default: 10
},
remainOldNum: {
type: Number,
default: 0
},
commonContractUrl: {
type: String,
default: ''
},
contactList: {
type: Array,
default: ''
},
unitList: {
type: Array,
default: ''
},
user: {
type: Object,
default: null
},
},
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
agree: false,
agreementReadCompleted: false,
allChildCate: [],
cateData: [],
cateDataIndex: 0,
form: {
type: 0,
category: 0,
files: [],
otherCate: false,
otherCateName: '',
title: '',
desc: '',
addressRegion: {},
addressDetail: '',
startNum: '',
unit: '吨',
startAmount: '',
expiredTime: '',
offerAddressRegion: {},
offerAddressNoLimit: false,
payMethod: '预付',
prePayRate: '',
otherPayMethodDesc: '',
signMethod: 0,
buyer: {
companyName: '',
contract: '',
personalName: '',
personalContract: '',
managerName: '',
managerContract: '',
},
supplier: {
companyName: '',
contract: '',
personalName: '',
personalContract: '',
managerName: '',
managerContract: '',
},
contractAttachment: [],
isUrgent: false,
supplementary: '',
invoice: false,
writeInvoiceTime: 0,
taxType: '一般纳税人',
invoiceType: '专用发票',
taxRate: '13%',
invoiceOther: '',
},
provinceIndex: null,
cityIndex: null,
areaIndex: null,
offerProvinceIndex: null,
offerCityIndex: null,
offerAreaIndex: null,
checked: '否',
showPicker: false,
cateName: '',
region: '',
offerRegion: '',
showUnit: false,
showExpire: false,
expireTime: '',
showContactPicker: false,
minDate: Number(new Date()),
maxDate: dayjs().add(1, 'year').valueOf(),
contractAttachment: [],
files: [],
}
},
methods: {
showAddress() {
this.$refs.AddressSelect.open(this.form.addressRegion);
},
regionConfirm({province, city, area}) {
this.form.addressRegion = {province, city, area}
this.region = `${province.name} ${city.name} ${area.name}`
},
showOfferAddress() {
this.$refs.OfferAddressSelect.open(this.form.offerAddressRegion);
},
offerRegionConfirm({province, city, area}) {
this.form.offerAddressRegion = {province, city, area}
this.offerRegion = `${province.name} ${city.name} ${area.name}`
},
async publish() {
if (this.remainOldNum === 0) {
uni.showModal({
title: '提示',
content: '您的旧货发布次数已用完,是否立即购买?',
success: async res => {
if (res.confirm) {
const {data} = await vk.callFunction({
url: 'client/old/kh/buyNum',
})
vk.navigateTo({
url: `/pages/shop/pay?id=${data}`
})
}
}
})
return
}
if (!this.form.addressRegion) return this.$message({
message: "请选择完整的物资所在地",
type: 'warning'
})
if (!this.form.addressDetail) return this.$message({
message: "请填写详细物资所在地",
type: 'warning'
})
if (!this.form.title) return this.$message({
message: "请填写标题",
type: 'warning'
})
if (!this.form.otherCate) {
if (!this.form.category) return this.$message({
message: "请选择分类",
type: 'warning'
})
} else {
if (!this.form.otherCateName) return this.$message({
message: "请输入其他分类",
type: 'warning'
})
this.form.category = ['', this.form.otherCateName]
}
if (!this.form.expiredTime) return this.$message({
message: "请选择失效时间",
type: 'warning'
})
if (dayjs(this.form.expiredTime).valueOf() > this.maxDate) return this.$message({
message: "为保证信息有效性发布最长时限为1年(12个月)",
type: 'warning'
})
if (this.form.payMethod === '预付' && String(this.form.prePayRate).trim() === '') return this.$message({
message: "请填写预付比例",
type: 'warning'
})
const res = await vk.callFunction({
url: 'client/old/kh/add',
data: this.form
})
localStorage.removeItem("old_0")
this.$message({
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
type: 'success'
})
setTimeout(() => {
if (this.form.isUrgent) {
vk.navigateTo({
url: `/pages/shop/pay?id=${res.data}`
})
} else {
vk.redirectTo({url: '/pages/junk/junk'});
}
}, 1500)
},
handleAgreementCheck(value) {
if (!value) {
this.agree = false
return
}
if (!this.agreementReadCompleted) {
this.agree = false
uni.showToast({
title: '请先查看《金久信旧货交易协议》5秒以上',
icon: 'none'
})
return
}
this.agree = true
},
onAgreementReadComplete() {
this.agreementReadCompleted = true
},
showAgreement() {
// this.$confirm(this.agreement, '金久信旧货交易协议', {
// cancelButtonText: '关闭',
// showConfirmButton: false,
// dangerouslyUseHTMLString: true,
// })
this.$refs.agreementRef.open()
},
openDownload() {
window.location.href = this.commonContractUrl
// window.open(this.commonContractUrl)
},
navTo() {
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
},
confirmCate({value}) {
this.form.category = value.map(i => i.name)
this.cateName = `${value[0].name} / ${value[1].name}`
this.showPicker = false
},
changeCate({columnIndex, index}) {
if (columnIndex === 0) {
this.cateDataIndex = index
}
},
confirmUnit({value}) {
this.form.unit = value[0]
this.showUnit = false
},
afterRead({file}) {
file.forEach(item => {
const suffix = item.name.split('.').pop()
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.form.files.push(res.fileList[0].tempFileURL)
this.files.push({url: res.fileList[0].tempFileURL})
})
}
})
})
},
deletePic({index}) {
this.form.files.splice(index, 1)
},
handConfirmDate({value}) {
this.form.expiredTime = dayjs(value).format('YYYY-MM-DD')
this.showExpire = false
},
confirmContact({value}) {
this.form.supplier.managerName = value[0].name
this.form.supplier.managerContract = value[0].phone
this.showContactPicker = false
},
changeOfferAddressNoLimit(val) {
if (val) {
this.form.offerAddressRegion = {}
this.offerRegion = ''
this.offerProvinceIndex = this.offerCityIndex = this.offerAreaIndex = null
}
},
afterReadAttachment({file}, field) {
for (let i = 0; i < file.length; i++) {
const item = file[i]
const suffix = item.name.split('.').pop()
if (field === 'files' || field === 'contractAttachment') {
if (item.type !== 'application/pdf') {
uni.showToast({
title: '请上传PDF文件',
icon: 'none'
})
return
}
}
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this[field].push({url: res.fileList[0].tempFileURL})
this.form[field].push(res.fileList[0].tempFileURL)
})
}
})
}
},
deletePicAttachment({index}, field) {
this[field].splice(index, 1)
this.form[field].splice(index, 1)
},
save() {
localStorage.setItem("old_0", JSON.stringify({
form: this.form,
cateName: this.cateName,
files: this.files,
region: this.region,
}))
this.$message({
message: "已保存",
type: 'success'
})
},
setOther(){
this.cateName = ''
},
openPicker(){
if(this.form.otherCate) return
this.showPicker = true
}
},
mounted() {
vk.callFunction({
url: 'client/old/pub/getTree',
title: '请求中...',
data: {type: 0},
success: (data) => {
this.cateData = data.rows.map(item => {
item.children.forEach(child => {
delete child.children
})
return item
})
}
});
if (this.user.accountType === 2) {
this.form.supplier.companyName = this.user.company.companyName
this.form.supplier.contract = this.user.company.mobile
} else {
this.form.supplier.companyName = this.user.person.personName
this.form.supplier.contract = this.user.person.mobile
}
if (!!localStorage.getItem("old_0")) {
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
const savedData = JSON.parse(localStorage.getItem("old_0"))
this.form = savedData.form
this.cateName = savedData.cateName
this.files = savedData.files
this.offerRegion = savedData.offerRegion
this.region = savedData.region
})
}
}
}
</script>
<style lang="scss">
page {
background: #ffffff;
}
.layout-header {
margin: 0rpx 30rpx;
padding: 30rpx 0;
border-bottom: 1px solid rgba(169, 41, 36, 0.34);
.big {
font-size: 32rpx;
line-height: 48rpx;
color: #000000;
text-align: center;
}
.small {
font-size: 24rpx;
line-height: 40rpx;
color: #9a9a9a;
text-align: center;
}
.ptb {
margin-right: 20rpx;
padding: 6rpx 14rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #333333;
border: 1px solid #f2f2f2;
&:last-child {
margin-right: 0;
}
}
.active {
color: #ffffff;
border-color: #A92924;
background: #A92924;
}
}
.public-btn {
width: 95%;
margin-top: 60rpx;
color: #ffffff;
background: #A92924;
}
.layout-publish {
padding: 20rpx 30rpx;
}
.tag-title {
font-size: 26rpx;
line-height: 40rpx;
color: #000000;
.limit {
font-size: 24rpx;
color: #999999;
}
}
.tag-box {
padding: 20rpx 0;
.item {
padding: 6rpx 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #555555;
}
.active {
color: #A92924;
}
}
.lb, .fix {
position: relative;
font-size: 26rpx;
line-height: 40rpx;
color: #666666;
}
.lbx {
font-size: 24rpx;
color: #999999;
}
.download {
padding: 8rpx 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
border: 1px solid #A92924;
}
.need::before {
position: absolute;
left: -16rpx;
top: 50%;
z-index: 9;
margin-top: -12rpx;
content: '*';
color: #A92924;
font-size: 32rpx;
line-height: 1;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 6rpx;
height: 28rpx;
background: #A92924;
}
}
.template-tab {
.ttb {
margin-right: 30rpx;
padding: 6rpx 20rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #333333;
border: 1px solid #f2f2f2;
}
.active {
color: #A92924;
border-color: #A92924;
}
}
.template-content {
padding: 30rpx 0;
}
.goods-item {
padding: 18rpx 0;
}
.expire-tip {
padding: 0 20rpx 18rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
}
.add-btn {
margin-left: 0;
width: 180rpx;
height: 60rpx;
color: #A92924;
border-color: #A92924;
}
</style>
+995
View File
@@ -0,0 +1,995 @@
<template>
<view class="flex flex-col justify-start items-start">
<text class="text-50">发布我的采购信息</text>
<text class="text-gray">采购信息越完整,成功交易越容易</text>
<view class="layout w-100p m-top-10">
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">信息失效时间:</view>
<view class="vl flex-1 p-right-20" @click="showExpire = true">
<u--input placeholder="请选择" v-model="form.expiredTime" style="pointer-events:none"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"></u--input>
</view>
</view>
<view class="expire-tip">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</view>
<view class="goods-item half flex align-center flex-wrap w-100p">
<text class="need text-red">*</text>
<view class="lb">物资分类:</view>
<view class="vl flex-1 p-right-20" @click="openPicker">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="cateName"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<el-checkbox label="其他分类" v-model="form.otherCate" class="mx-20"></el-checkbox>
<u--input
placeholder="请选择"
v-model="form.otherCateName"
fontSize="24rpx"
:disabled="!form.otherCate"
@change="setOther"
></u--input>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">信息标题:</view>
<view class="vl flex-1 p-right-20">
<u--input
placeholder="一句话简介物资,如拍卖直缝钢管200吨等"
v-model="form.title"
fontSize="24rpx"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">采购物资详情:</view>
<view class="vl flex-1 p-right-20">
<u--textarea
placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
v-model="form.desc"
fontSize="24rpx"
></u--textarea>
</view>
</view>
<!-- <view class="goods-item half flex align-center flex-wrap mt-20 w-100p">-->
<!-- <view class="lb">物资装货所在地:</view>-->
<!-- <view class="vl flex-1 p-right-20" @click="showAddress">-->
<!-- <u&#45;&#45;input-->
<!-- style="pointer-events:none"-->
<!-- placeholder="请选择"-->
<!-- v-model="region"-->
<!-- fontSize="24rpx"-->
<!-- suffixIcon="arrow-down-fill"-->
<!-- suffixIconStyle="font-size: 10px;color: #d5d5d5"-->
<!-- :disabled="true"-->
<!-- disabledColor="#fff"-->
<!-- ></u&#45;&#45;input>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="goods-item half flex align-center flex-wrap mt-20 w-100p">-->
<!-- <view class="lb">物资装货详细地址:</view>-->
<!-- <view class="vl flex-1 p-right-20">-->
<!-- <u&#45;&#45;input placeholder="请选择" v-model="form.addressDetail"></u&#45;&#45;input>-->
<!-- </view>-->
<!-- </view>-->
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">物资交货所在地:</view>
<view class="vl flex-1 p-right-20" @click="deliverShowAddress">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="deliverRegion"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">物资交货详细地址:</view>
<view class="vl flex-1 p-right-20">
<u--input placeholder="请选择" v-model="form.deliverAddressDetail"></u--input>
</view>
</view>
<view class="card-title m-top-30">税票要求</view>
<view class="flex justify-start align-center m-top-30">
<u-radio-group
v-model="form.invoice"
placement="row"
>
<u-radio activeColor="red" :name='true' label="含税" :customStyle="{marginRight: '30px'}"></u-radio>
<u-radio activeColor="red" :name='false' label="不含税"></u-radio>
</u-radio-group>
</view>
<template v-if="form.invoice">
<view class="group flex m-top-30">
<view class="lb m-right-20">开票时间:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.writeInvoiceTime" placement="column">
<u-radio activeColor="red" :name='0' label="付款当月(限20号之后付款次月开票)"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" :name='1' label="付款后次月"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" :name='2' label="付款前"></u-radio>
</u-radio-group>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">纳税人身份:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.taxType" placement="column">
<u-radio activeColor="red" name='一般纳税人' label="一般纳税人"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='小规模公司' label="小规模公司"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='个体工商户' label="个体工商户"></u-radio>
</u-radio-group>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">发票种类:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.invoiceType" placement="column">
<u-radio activeColor="red" name='专用发票' label="专用发票"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='普通发票' label="普通发票"
:customStyle="{marginBottom: '10px'}"></u-radio>
</u-radio-group>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">税率:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.taxRate" placement="column">
<u-radio activeColor="red" v-for="(item, index) in ['13%', '9%', '6%', '4%', '3%', '1%']"
:key="index" :name='item' :label="item"
:customStyle="{marginBottom: '10px'}"/>
</u-radio-group>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">手动填写税票要求:</view>
<view class="vl flex-1">
<u--input
placeholder="如:一般纳税人 专用发票 税率13%"
border="surround"
v-model="form.invoiceOther"
></u--input>
</view>
</view>
</template>
<view class="card-title m-top-30">交易说明</view>
<!-- <view class="group flex align-center m-top-30">-->
<!-- <view class="lb m-right-20">报价明细:</view>-->
<!-- <view class="vl flex-1">-->
<!-- <u&#45;&#45;input-->
<!-- placeholder="请输入内容"-->
<!-- border="surround"-->
<!-- v-model="form.invoiceDetail"-->
<!-- ></u&#45;&#45;input>-->
<!-- </view>-->
<!-- </view>-->
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">报价区域:</view>
<view class="vl flex-1 p-right-20" @click="offerShowAddress">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="offerRegion"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
<el-checkbox v-model="form.offerAddressNoLimit" @change="changeOfferAddressNoLimit">不限区域
</el-checkbox>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">报价截止时间:</view>
<view class="vl flex-1 p-right-20" @click="showOfferExpire = true">
<u--input placeholder="请选择" v-model="form.offerExpiredTime" style="pointer-events:none"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"></u--input>
</view>
</view>
<view class="group flex m-top-30">
<view class="lb m-right-20">付款方式:</view>
<view class="vl flex-1">
<u-radio-group v-model="form.payMethod" placement="column">
<!-- <u-radio activeColor="red" name='预付' label="预付N%,货到付全款"-->
<!-- :customStyle="{marginBottom: '10px'}"></u-radio>-->
<u-radio activeColor="red" name='预付'
:customStyle="{marginBottom: '10px'}">
<view class="text-25 flex justify-start items-center">
<text>预付</text>
<u-input v-model="form.prePayRate" :disabled="form.payMethod !== '预付'"
:custom-style="{width: '100rpx'}"></u-input>
<text>%,货到付全款</text>
</view>
</u-radio>
<u-radio activeColor="red" name='提货付全款' label="提货付全款"
:customStyle="{marginBottom: '10px'}"></u-radio>
<u-radio activeColor="red" name='其他付款方式描述'
:customStyle="{marginBottom: '10px'}">
<view class="flex justify-start items-start flex-col w-100p">
<text style="color: rgb(96, 98, 102);
font-size: 15px;
line-height: 15px;">其他付款方式描述
</text>
<u--textarea v-model="form.otherPayMethodDesc" :disabled="form.payMethod !== '其他付款方式描述'"
placeholder="请输入内容" :custom-style="{width: '400rpx'}"/>
</view>
</u-radio>
</u-radio-group>
</view>
</view>
<view class="flex justify-start align-center m-top-30">
<view class="lb m-right-20">报价形式:</view>
<view class="vl flex-1">
<u-radio-group
v-model="form.offerType"
placement="row"
>
<u-radio activeColor="red" name='整单报价' label="整单报价"
:customStyle="{marginRight: '30px'}"></u-radio>
<u-radio activeColor="red" name='可分项报价' label="可分项报价"></u-radio>
</u-radio-group>
</view>
</view>
<view class="card-title m-top-30">合同条款</view>
<view class="flex justify-start align-center m-top-30">
<u-radio-group v-model="form.signMethod" placement="column">
<u-radio activeColor="red" :name='0' label="线上签约-标准合同"
:customStyle="{marginBottom: '30rpx'}"></u-radio>
<u-radio activeColor="red" :name='2' label="线上签约-双方协商合同"
:customStyle="{marginBottom: '30rpx'}"></u-radio>
<u-radio activeColor="red" :name='1' label="线下签约"
:customStyle="{marginBottom: '30rpx'}"></u-radio>
</u-radio-group>
</view>
<template v-if="form.signMethod === 2">
<view class="card-title m-top-30">合同附件</view>
<u-upload
accept="file"
:fileList="contractAttachment"
@afterRead="afterReadAttachment($event, 'contractAttachment')"
@delete="deletePicAttachment($event, 'contractAttachment')"
name="contractAttachment"
multiple
:maxCount="10"
></u-upload>
</template>
<view v-if="form.signMethod === 0" class="text-25" style="line-height: 32rpx">
<view v-if="form.signMethod === 0" class="mb-15">补充条款</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">违约责任:</view>
<view class="pl-20 flex-1 py-20">
1.
乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;
2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">解决纠纷的方法:</view>
<view class="pl-20 flex-1 py-20">
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工费和获取证据产生费用等其他相关费用。
2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">不可抗力:</view>
<view class="pl-20 flex-1 py-20">
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="m-10">其他:</view>
<view class="pl-20 flex-1 py-20">
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
</view>
</view>
<view class="flex justify-start items-start flex-col">
<view class="lb m-right-20">采购方补充条款:</view>
<view class="vl w-100p">
<u--textarea
placeholder="请输入内容"
v-model="form.supplementary"
></u--textarea>
</view>
</view>
</view>
<view class="card-title m-top-30">采购商信息</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">采购商:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
v-model="form.buyer.companyName"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系方式:</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
v-model="form.buyer.contract"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系人:</view>
<view class="vl flex-1" @click="showContactPicker = true">
<u--input
style="pointer-events:none"
readonly
placeholder="点击选择联系人"
v-model="form.buyer.managerName"
suffixIcon="arrow-right"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系方式:</view>
<view class="vl flex-1">
<u--input
disabled
placeholder="请输入内容"
v-model="form.buyer.managerContract"
></u--input>
</view>
</view>
</view>
<view class="mt-20 flex justify-start items-center">
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
<el-radio label="是" v-model="checked">
<text>是</text>
</el-radio>
<el-radio label="否" v-model="checked">
<text>否</text>
</el-radio>
</view>
<view class="mt-20 flex justify-start items-center">
<text class="mr-25">是否加急({{ urgentAmount }}元/次):</text>
<el-radio :label="true" v-model="form.isUrgent">
<text>是</text>
</el-radio>
<el-radio :label="false" v-model="form.isUrgent">
<text>否</text>
</el-radio>
</view>
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
<view class="flex justify-start items-center">
<el-checkbox :value="agree" active-color="#A92924" @change="handleAgreementCheck">我已阅读并同意</el-checkbox>
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
</view>
<view class="flex justify-center items-center mt-30 m-a w-100p">
<view class="flex-1 mx-15">
<u-button type="primary" @click="save" plain="">暂存</u-button>
</view>
<view class="flex-1 mx-15">
<u-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</u-button>
</view>
</view>
<u-picker v-if="showPicker" :show="showPicker" :columns="[cateData, cateData[cateDataIndex].children]"
keyName="name" @change="changeCate"
@cancel="showPicker = false" @close="showPicker = false" closeOnClickOverlay
@confirm="confirmCate"></u-picker>
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
<AddressSelect ref="DeliverAddressSelect" @confirm="deliverRegionConfirm"/>
<AddressSelect ref="OfferAddressSelect" @confirm="offerRegionConfirm"/>
<u-picker :show="showUnit" :columns="[unitList]"
@cancel="showUnit = false" @close="showUnit = false" closeOnClickOverlay
@confirm="confirmUnit"></u-picker>
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="date" @cancel="showExpire = false"
:minDate="minDate" :maxDate="maxDate"
@confirm="handConfirmDate"></u-datetime-picker>
<u-datetime-picker :show="showOfferExpire" v-model="offerExpiredTime" mode="date"
@cancel="showOfferExpire = false" :minDate="minDate"
@confirm="handOfferConfirmDate"></u-datetime-picker>
<u-picker :show="showContactPicker" :columns="[contactList]" keyName="name"
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
@confirm="confirmContact"></u-picker>
<agreement ref="agreementRef" @read-complete="onAgreementReadComplete"/>
</view>
</template>
<script>
import AddressSelect from "@/components/AddressSelect.vue";
import dayjs from "dayjs";
import {INVOICE_TYPE, WRITE_INVOICE_TIME} from "@/util";
import md5 from "js-md5";
import Agreement from "@/pages/junk/agreement.vue";
export default {
name: "type_0",
components: {Agreement, AddressSelect},
props: {
urgentAmount: {
type: Number,
default: 10
},
remainOldNum: {
type: Number,
default: 0
},
agreement: {
type: String,
default: ''
},
commonContractUrl: {
type: String,
default: ''
},
contactList: {
type: Array,
default: ''
},
user: {
type: Object,
default: null
},
},
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
agree: false,
agreementReadCompleted: false,
unitList: ['吨', '万吨'],
allChildCate: [],
cateData: [],
cateDataIndex: 0,
form: {
otherCate: false,
otherCateName: '',
type: 1,
category: 0,
files: [],
title: '',
desc: '',
addressRegion: {},
addressDetail: '',
deliverAddressRegion: {},
deliverAddressDetail: '',
invoiceDetail: '',
expiredTime: '',
offerExpiredTime: '',
offerAddressRegion: {},
offerAddressNoLimit: false,
payMethod: '预付',
offerType: '整单报价',
prePayRate: '',
otherPayMethodDesc: '',
signMethod: 0,
buyer: {
companyName: '',
contract: '',
personalName: '',
personalContract: '',
managerName: '',
managerContract: '',
},
supplier: {
companyName: '',
contract: '',
personalName: '',
personalContract: '',
managerName: '',
managerContract: '',
},
contractAttachment: [],
isUrgent: false,
supplementary: '',
invoice: false,
writeInvoiceTime: 0,
taxType: '一般纳税人',
invoiceType: '专用发票',
taxRate: '13%',
invoiceOther: '',
},
provinceIndex: null,
cityIndex: null,
areaIndex: null,
offerProvinceIndex: null,
offerCityIndex: null,
offerAreaIndex: null,
checked: '否',
showPicker: false,
cateName: '',
region: '',
deliverRegion: '',
offerRegion: '',
showUnit: false,
showExpire: false,
showOfferExpire: false,
expireTime: '',
offerExpiredTime: '',
showContactPicker: false,
minDate: Number(new Date()),
maxDate: dayjs().add(1, 'year').valueOf()
}
},
methods: {
INVOICE_TYPE() {
return INVOICE_TYPE
},
WRITE_INVOICE_TIME() {
return WRITE_INVOICE_TIME
},
showAddress() {
this.$refs.AddressSelect.open(this.form.addressRegion);
},
regionConfirm({province, city, area}) {
this.form.addressRegion = {province, city, area}
this.region = `${province.name} ${city.name} ${area.name}`
},
deliverShowAddress() {
this.$refs.DeliverAddressSelect.open(this.form.deliverAddressRegion);
},
deliverRegionConfirm({province, city, area}) {
this.form.deliverAddressRegion = {province, city, area}
this.deliverRegion = `${province.name} ${city.name} ${area.name}`
},
offerShowAddress() {
this.$refs.OfferAddressSelect.open(this.form.offerAddressRegion);
},
offerRegionConfirm({province, city, area}) {
this.form.offerAddressRegion = {province, city, area}
this.offerRegion = `${province.name} ${city.name} ${area.name}`
},
async publish() {
if (this.remainOldNum === 0) {
uni.showModal({
title: '提示',
content: '您的旧货发布次数已用完,是否立即购买?',
success: async res => {
if (res.confirm) {
const {data} = await vk.callFunction({
url: 'client/old/kh/buyNum',
})
vk.navigateTo({
url: `/pages/shop/pay?id=${data}`
})
}
}
})
return
}
if (!this.form.deliverAddressRegion) return this.$message({
message: "请选择完整的物资所在地",
type: 'warning'
})
if (!this.form.deliverAddressDetail) return this.$message({
message: "请填写详细物资所在地",
type: 'warning'
})
if (!this.form.title) return this.$message({
message: "请填写标题",
type: 'warning'
})
if (!this.form.otherCate) {
if (!this.form.category) return this.$message({
message: "请选择分类",
type: 'warning'
})
} else {
if (!this.form.otherCateName) return this.$message({
message: "请输入其他分类",
type: 'warning'
})
this.form.category = ['', this.form.otherCateName]
}
if (!this.form.expiredTime) return this.$message({
message: "请选择失效时间",
type: 'warning'
})
if (dayjs(this.form.expiredTime).valueOf() > this.maxDate) return this.$message({
message: "为保证信息有效性发布最长时限为1年(12个月)",
type: 'warning'
})
if (this.form.payMethod === '预付' && String(this.form.prePayRate).trim() === '') return this.$message({
message: "请填写预付比例",
type: 'warning'
})
this.form.files = this.form.files.map(i => i.url)
const res = await vk.callFunction({
url: 'client/old/kh/add',
data: this.form
})
localStorage.removeItem("old_1")
this.$message({
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
type: 'success'
})
setTimeout(() => {
if (this.form.isUrgent) {
vk.navigateTo({
url: `/pages/shop/pay?id=${res.data}`
})
} else {
vk.redirectTo({url: '/pages/junk/junk'});
}
}, 1500)
},
handleAgreementCheck(value) {
if (!value) {
this.agree = false
return
}
if (!this.agreementReadCompleted) {
this.agree = false
uni.showToast({
title: '请先查看《金久信旧货交易协议》5秒以上',
icon: 'none'
})
return
}
this.agree = true
},
onAgreementReadComplete() {
this.agreementReadCompleted = true
},
showAgreement() {
// this.$confirm(this.agreement, '金久信旧货交易协议', {
// cancelButtonText: '关闭',
// showConfirmButton: false,
// dangerouslyUseHTMLString: true,
// })
this.$refs.agreementRef.open()
},
openDownload() {
// window.open(this.commonContractUrl)
window.location.href = this.commonContractUrl
},
navTo() {
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
},
confirmCate({value}) {
this.form.category = value.map(i => i.name)
this.cateName = `${value[0].name}${value[1].name}`
this.showPicker = false
},
confirmUnit({value}) {
this.form.unit = value
this.showUnit = false
},
afterRead({file}) {
file.forEach(item => {
const suffix = item.name.split('.').pop()
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.form.files.push({url: res.fileList[0].tempFileURL})
})
}
})
})
},
deletePic({index}) {
this.form.files.splice(index, 1)
},
handConfirmDate({value}) {
this.form.expiredTime = dayjs(value).format('YYYY-MM-DD')
this.showExpire = false
},
handOfferConfirmDate({value}) {
this.form.offerExpiredTime = dayjs(value).format('YYYY-MM-DD')
this.showOfferExpire = false
},
confirmContact({value}) {
this.form.buyer.managerName = value[0].name
this.form.buyer.managerContract = value[0].phone
this.showContactPicker = false
},
changeOfferAddressNoLimit(val) {
if (val) {
this.form.offerAddressRegion = {}
this.offerRegion = ''
this.offerProvinceIndex = this.offerCityIndex = this.offerAreaIndex = null
}
},
changeCate({columnIndex, index}) {
if (columnIndex === 0) {
this.cateDataIndex = index
}
},
save() {
localStorage.setItem("old_1", JSON.stringify({
form: this.form,
cateName: this.cateName,
files: this.files,
region: this.region,
deliverRegion: this.deliverRegion,
offerRegion: this.offerRegion,
}))
this.$message({
message: "已保存",
type: 'success'
})
},
afterReadAttachment({file}, field) {
for (let i = 0; i < file.length; i++) {
const item = file[i]
const suffix = item.name.split('.').pop()
if (field === 'files' || field === 'contractAttachment') {
if (item.type !== 'application/pdf') {
uni.showToast({
title: '请上传PDF文件',
icon: 'none'
})
return
}
}
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this[field].push({url: res.fileList[0].tempFileURL})
this.form[field].push(res.fileList[0].tempFileURL)
})
}
})
}
},
deletePicAttachment({index}, field) {
this[field].splice(index, 1)
this.form[field].splice(index, 1)
},
setOther() {
this.cateName = ''
},
openPicker() {
if (this.form.otherCate) return
this.showPicker = true
}
},
mounted() {
vk.callFunction({
url: 'client/old/pub/getTree',
title: '请求中...',
data: {type: 1},
success: (data) => {
this.cateData = data.rows.map(item => {
item.children.forEach(child => {
delete child.children
})
return item
})
}
});
if (this.user.accountType === 2) {
this.form.buyer.companyName = this.user.company.companyName
this.form.buyer.contract = this.user.company.mobile
} else {
this.form.buyer.companyName = this.user.person.personName
this.form.buyer.contract = this.user.person.mobile
}
if (!!localStorage.getItem("old_1")) {
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
const savedData = JSON.parse(localStorage.getItem("old_1"))
this.form = savedData.form
this.cateName = savedData.cateName
this.files = savedData.files
this.deliverRegion = savedData.deliverRegion
this.offerRegion = savedData.offerRegion
this.region = savedData.region
})
}
}
}
</script>
<style lang="scss">
page {
background: #ffffff;
}
.layout-header {
margin: 0rpx 30rpx;
padding: 30rpx 0;
border-bottom: 1px solid rgba(169, 41, 36, 0.34);
.big {
font-size: 32rpx;
line-height: 48rpx;
color: #000000;
text-align: center;
}
.small {
font-size: 24rpx;
line-height: 40rpx;
color: #9a9a9a;
text-align: center;
}
.ptb {
margin-right: 20rpx;
padding: 6rpx 14rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #333333;
border: 1px solid #f2f2f2;
&:last-child {
margin-right: 0;
}
}
.active {
color: #ffffff;
border-color: #A92924;
background: #A92924;
}
}
.public-btn {
width: 95%;
margin-top: 60rpx;
color: #ffffff;
background: #A92924;
}
.layout-publish {
padding: 20rpx 30rpx;
}
.tag-title {
font-size: 26rpx;
line-height: 40rpx;
color: #000000;
.limit {
font-size: 24rpx;
color: #999999;
}
}
.tag-box {
padding: 20rpx 0;
.item {
padding: 6rpx 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #555555;
}
.active {
color: #A92924;
}
}
.lb, .fix {
position: relative;
font-size: 26rpx;
line-height: 40rpx;
color: #666666;
}
.lbx {
font-size: 24rpx;
color: #999999;
}
.download {
padding: 8rpx 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
border: 1px solid #A92924;
}
.need::before {
position: absolute;
left: -16rpx;
top: 50%;
z-index: 9;
margin-top: -12rpx;
content: '*';
color: #A92924;
font-size: 32rpx;
line-height: 1;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 6rpx;
height: 28rpx;
background: #A92924;
}
}
.template-tab {
.ttb {
margin-right: 30rpx;
padding: 6rpx 20rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #333333;
border: 1px solid #f2f2f2;
}
.active {
color: #A92924;
border-color: #A92924;
}
}
.template-content {
padding: 30rpx 0;
}
.goods-item {
padding: 18rpx 0;
}
.expire-tip {
padding: 0 20rpx 18rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
}
.add-btn {
margin-left: 0;
width: 180rpx;
height: 60rpx;
color: #A92924;
border-color: #A92924;
}
</style>
File diff suppressed because it is too large Load Diff
+683
View File
@@ -0,0 +1,683 @@
<template>
<view class="flex flex-col justify-start items-start">
<text class="text-50">发布我的回收信息</text>
<text class="text-gray">回收信息越完整,成功交易越容易</text>
<view class="layout w-100p m-top-10">
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">信息失效时间:</view>
<view class="vl flex-1 p-right-20" @click="showExpire = true">
<u--input placeholder="请选择" v-model="form.expiredTime" style="pointer-events:none"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"></u--input>
</view>
</view>
<view class="expire-tip">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</view>
<view class="goods-item half flex align-center flex-wrap w-100p">
<text class="need text-red">*</text>
<view class="lb">物资分类:</view>
<view class="vl flex-1 p-right-20" @click="openPicker">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="cateName"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<el-checkbox label="其他分类" v-model="form.otherCate" class="mx-20"></el-checkbox>
<u--input
placeholder="请选择"
v-model="form.otherCateName"
fontSize="24rpx"
:disabled="!form.otherCate" @change="setOther"
></u--input>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">信息标题:</view>
<view class="vl flex-1 p-right-20">
<u--input
placeholder="一句话简介物资,如拍卖直缝钢管200吨等"
v-model="form.title"
fontSize="24rpx"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">回收方简述:</view>
<view class="vl flex-1 p-right-20">
<u--textarea
placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
v-model="form.desc"
fontSize="24rpx"
></u--textarea>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<view class="lb">回收物实景照片:</view>
<view class="vl flex-1 p-right-20">
<u-upload
multiple
:fileList="form.files"
@afterRead="afterRead"
@delete="deletePic"
width="120rpx"
height="120rpx"
></u-upload>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">回收单位所在地:</view>
<view class="vl flex-1 p-right-20" @click="showAddress">
<u--input
style="pointer-events:none"
placeholder="请选择"
v-model="region"
fontSize="24rpx"
suffixIcon="arrow-down-fill"
suffixIconStyle="font-size: 10px;color: #d5d5d5"
:disabled="true"
disabledColor="#fff"
></u--input>
</view>
</view>
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
<text class="need text-red">*</text>
<view class="lb">回收单位地址:</view>
<view class="vl flex-1 p-right-20">
<u--input placeholder="请选择" v-model="form.addressDetail"></u--input>
</view>
</view>
<view class="card-title m-top-30">回收单位信息</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司信息' : '个人信息' }} :</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
v-model="form.supplier.companyName"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司联系方式' : '个人联系方式' }} :</view>
<view class="vl flex-1">
<u--input
placeholder="请输入内容"
v-model="form.supplier.contract"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系人:</view>
<view class="vl flex-1" @click="showContactPicker = true">
<u--input
style="pointer-events:none"
readonly
placeholder="点击选择联系人"
v-model="form.supplier.managerName"
suffixIcon="arrow-right"
></u--input>
</view>
</view>
<view class="group flex align-center m-top-30">
<view class="lb m-right-20">联系方式:</view>
<view class="vl flex-1">
<u--input
disabled
placeholder="请输入内容"
v-model="form.supplier.managerContract"
></u--input>
</view>
</view>
</view>
<view class="mt-20 flex justify-start items-center">
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
<el-radio label="是" v-model="checked">
<text>是</text>
</el-radio>
<el-radio label="否" v-model="checked">
<text>否</text>
</el-radio>
</view>
<view class="mt-20 flex justify-start items-center">
<text class="mr-25">是否加急({{ urgentAmount }}元/次):</text>
<el-radio :label="true" v-model="form.isUrgent">
<text>是</text>
</el-radio>
<el-radio :label="false" v-model="form.isUrgent">
<text>否</text>
</el-radio>
</view>
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
<view class="flex justify-start items-center">
<el-checkbox :value="agree" active-color="#A92924" @change="handleAgreementCheck">我已阅读并同意</el-checkbox>
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
</view>
<view class="flex justify-center items-center mt-30 m-a w-100p">
<view class="flex-1 mx-15">
<u-button type="primary" @click="save" plain="">暂存</u-button>
</view>
<view class="flex-1 mx-15">
<u-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</u-button>
</view>
</view>
<u-picker v-if="showPicker" :show="showPicker" :columns="[cateData, cateData[cateDataIndex].children]"
keyName="name" @change="changeCate"
@cancel="showPicker = false" @close="showPicker = false" closeOnClickOverlay
@confirm="confirmCate"></u-picker>
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
<u-picker :show="showUnit" :columns="[unitList]"
@cancel="showUnit = false" @close="showUnit = false" closeOnClickOverlay
@confirm="confirmUnit"></u-picker>
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="date" @cancel="showExpire = false"
:minDate="minDate" :maxDate="maxDate"
@confirm="handConfirmDate"></u-datetime-picker>
<u-picker :show="showContactPicker" :columns="[contactList]" keyName="name"
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
@confirm="confirmContact"></u-picker>
<agreement ref="agreementRef" @read-complete="onAgreementReadComplete"/>
</view>
</template>
<script>
import AddressSelect from "@/components/AddressSelect.vue";
import dayjs from "dayjs";
import md5 from "js-md5";
import Agreement from "@/pages/junk/agreement.vue";
export default {
name: "type_0",
components: {Agreement, AddressSelect},
props: {
urgentAmount: {
type: Number,
default: 10
},
remainOldNum: {
type: Number,
default: 0
},
agreement: {
type: String,
default: ''
},
commonContractUrl: {
type: String,
default: ''
},
contactList: {
type: Array,
default: ''
},
user: {
type: Object,
default: null
},
},
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
agree: false,
agreementReadCompleted: false,
unitList: ['吨', '万吨'],
allChildCate: [],
cateData: [],
cateDataIndex: 0,
form: {
type: 3,
category: 0,
files: [],
otherCate: false,
otherCateName: '',
title: '',
desc: '',
addressRegion: {},
addressDetail: '',
startNum: '',
unit: '吨',
startAmount: '',
expiredTime: '',
offerAddressRegion: {},
offerAddressNoLimit: false,
payMethod: '预付',
prePayRate: '',
otherPayMethodDesc: '',
signMethod: 0,
buyer: {
companyName: '',
contract: '',
personalName: '',
personalContract: '',
managerName: '',
managerContract: '',
},
supplier: {
companyName: '',
contract: '',
personalName: '',
personalContract: '',
managerName: '',
managerContract: '',
},
contractAttachment: [],
isUrgent: false,
supplementary: ''
},
provinceIndex: null,
cityIndex: null,
areaIndex: null,
offerProvinceIndex: null,
offerCityIndex: null,
offerAreaIndex: null,
checked: '否',
showPicker: false,
cateName: '',
region: '',
showUnit: false,
showExpire: false,
expireTime: '',
showContactPicker: false,
minDate: Number(new Date()),
maxDate: dayjs().add(1, 'year').valueOf()
}
},
methods: {
showAddress() {
this.$refs.AddressSelect.open(this.form.addressRegion);
},
regionConfirm({province, city, area}) {
this.form.addressRegion = {province, city, area}
this.region = `${province.name} ${city.name} ${area.name}`
},
async publish() {
if (this.remainOldNum === 0) {
uni.showModal({
title: '提示',
content: '您的旧货发布次数已用完,是否立即购买?',
success: async res => {
if (res.confirm) {
const {data} = await vk.callFunction({
url: 'client/old/kh/buyNum',
})
vk.navigateTo({
url: `/pages/shop/pay?id=${data}`
})
}
}
})
return
}
if (!this.form.addressRegion) return this.$message({
message: "请选择完整的物资所在地",
type: 'warning'
})
if (!this.form.addressDetail) return this.$message({
message: "请填写详细物资所在地",
type: 'warning'
})
if (!this.form.title) return this.$message({
message: "请填写标题",
type: 'warning'
})
if (!this.form.otherCate) {
if (!this.form.category) return this.$message({
message: "请选择分类",
type: 'warning'
})
} else {
if (!this.form.otherCateName) return this.$message({
message: "请输入其他分类",
type: 'warning'
})
this.form.category = ['', this.form.otherCateName]
}
if (!this.form.expiredTime) return this.$message({
message: "请选择失效时间",
type: 'warning'
})
if (dayjs(this.form.expiredTime).valueOf() > this.maxDate) return this.$message({
message: "为保证信息有效性发布最长时限为1年(12个月)",
type: 'warning'
})
this.form.files = this.form.files.map(i => i.url)
const res = await vk.callFunction({
url: 'client/old/kh/add',
data: this.form
})
localStorage.removeItem("old_3")
this.$message({
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
type: 'success'
})
setTimeout(() => {
if (this.form.isUrgent) {
vk.navigateTo({
url: `/pages/shop/pay?id=${res.data}`
})
} else {
vk.redirectTo({url: '/pages/junk/junk'});
}
}, 1500)
},
handleAgreementCheck(value) {
if (!value) {
this.agree = false
return
}
if (!this.agreementReadCompleted) {
this.agree = false
uni.showToast({
title: '请先查看《金久信旧货交易协议》5秒以上',
icon: 'none'
})
return
}
this.agree = true
},
onAgreementReadComplete() {
this.agreementReadCompleted = true
},
showAgreement() {
// this.$confirm(this.agreement, '金久信旧货交易协议', {
// cancelButtonText: '关闭',
// showConfirmButton: false,
// dangerouslyUseHTMLString: true,
// })
this.$refs.agreementRef.open()
},
openDownload() {
// window.open(this.commonContractUrl)
window.location.href = this.commonContractUrl
},
navTo() {
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
},
confirmCate({value}) {
this.form.category = value.map(i => i.name)
this.cateName = `${value[0].name}${value[1].name}`
this.showPicker = false
},
confirmUnit({value}) {
this.form.unit = value
this.showUnit = false
},
afterRead({file}) {
file.forEach(item => {
const suffix = item.name.split('.').pop()
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.form.files.push({url: res.fileList[0].tempFileURL})
})
}
})
})
},
deletePic({index}) {
this.form.files.splice(index, 1)
},
handConfirmDate({value}) {
this.form.expiredTime = dayjs(value).format('YYYY-MM-DD')
this.showExpire = false
},
confirmContact({value}) {
this.form.supplier.managerName = value[0].name
this.form.supplier.managerContract = value[0].phone
this.showContactPicker = false
},
changeCate({columnIndex, index}) {
if (columnIndex === 0) {
this.cateDataIndex = index
}
},
save() {
localStorage.setItem("old_3", JSON.stringify({
form: this.form,
cateName: this.cateName,
region: this.region,
}))
this.$message({
message: "已保存",
type: 'success'
})
},
setOther(){
this.cateName = ''
},
openPicker(){
if(this.form.otherCate) return
this.showPicker = true
}
},
mounted() {
vk.callFunction({
url: 'client/old/pub/getTree',
title: '请求中...',
data: {type: 3},
success: (data) => {
this.cateData = data.rows.map(item => {
item.children.forEach(child => {
delete child.children
})
return item
})
}
});
if (this.user.accountType === 2) {
this.form.supplier.companyName = this.user.company.companyName
this.form.supplier.contract = this.user.company.mobile
} else {
this.form.supplier.companyName = this.user.person.personName
this.form.supplier.contract = this.user.person.mobile
}
this.form.supplier.contract = this.user.businessCard.companyMobile
if (!!localStorage.getItem("old_3")) {
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
const savedData = JSON.parse(localStorage.getItem("old_3"))
this.form = savedData.form
this.cateName = savedData.cateName
this.region = savedData.region
})
}
}
}
</script>
<style lang="scss">
page {
background: #ffffff;
}
.layout-header {
margin: 0rpx 30rpx;
padding: 30rpx 0;
border-bottom: 1px solid rgba(169, 41, 36, 0.34);
.big {
font-size: 32rpx;
line-height: 48rpx;
color: #000000;
text-align: center;
}
.small {
font-size: 24rpx;
line-height: 40rpx;
color: #9a9a9a;
text-align: center;
}
.ptb {
margin-right: 20rpx;
padding: 6rpx 14rpx;
font-size: 24rpx;
line-height: 40rpx;
color: #333333;
border: 1px solid #f2f2f2;
&:last-child {
margin-right: 0;
}
}
.active {
color: #ffffff;
border-color: #A92924;
background: #A92924;
}
}
.public-btn {
width: 95%;
margin-top: 60rpx;
color: #ffffff;
background: #A92924;
}
.layout-publish {
padding: 20rpx 30rpx;
}
.tag-title {
font-size: 26rpx;
line-height: 40rpx;
color: #000000;
.limit {
font-size: 24rpx;
color: #999999;
}
}
.tag-box {
padding: 20rpx 0;
.item {
padding: 6rpx 10rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #555555;
}
.active {
color: #A92924;
}
}
.lb, .fix {
position: relative;
font-size: 26rpx;
line-height: 40rpx;
color: #666666;
}
.lbx {
font-size: 24rpx;
color: #999999;
}
.download {
padding: 8rpx 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
border: 1px solid #A92924;
}
.need::before {
position: absolute;
left: -16rpx;
top: 50%;
z-index: 9;
margin-top: -12rpx;
content: '*';
color: #A92924;
font-size: 32rpx;
line-height: 1;
}
.card-title {
position: relative;
padding-left: 20rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 48rpx;
color: #A92924;
&:before {
position: absolute;
left: 0;
top: 50%;
z-index: 9;
margin-top: -14rpx;
content: '';
width: 6rpx;
height: 28rpx;
background: #A92924;
}
}
.template-tab {
.ttb {
margin-right: 30rpx;
padding: 6rpx 20rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #333333;
border: 1px solid #f2f2f2;
}
.active {
color: #A92924;
border-color: #A92924;
}
}
.template-content {
padding: 30rpx 0;
}
.goods-item {
padding: 18rpx 0;
}
.expire-tip {
padding: 0 20rpx 18rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #A92924;
}
.add-btn {
margin-left: 0;
width: 180rpx;
height: 60rpx;
color: #A92924;
border-color: #A92924;
}
</style>