683a9411fd
Co-authored-by: Cursor <cursoragent@cursor.com>
921 lines
36 KiB
Vue
921 lines
36 KiB
Vue
<template>
|
||
<view>
|
||
<top-bar></top-bar>
|
||
<common-header></common-header>
|
||
<category-bar></category-bar>
|
||
|
||
<view class="page-nav">
|
||
<el-breadcrumb separator="/">
|
||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||
<el-breadcrumb-item>
|
||
<navigator style="display: inline-block;" url="/pages/enquiry/list">询价单</navigator>
|
||
</el-breadcrumb-item>
|
||
<el-breadcrumb-item>询价单详情</el-breadcrumb-item>
|
||
</el-breadcrumb>
|
||
</view>
|
||
|
||
<view class="page-main" v-if="sheet">
|
||
<view class="flex justify-between items-center">
|
||
<text class="text-gray">询价单编号:{{ sheet.enquiryNo }}</text>
|
||
<text class="text-gray">发布时间:{{ sheet._add_time_str }}</text>
|
||
</view>
|
||
<view class="my-25 flex justify-between items-center">
|
||
<view class="flex justify-start items-center">
|
||
<text class="text-40 font-bold">{{ sheet.title }}</text>
|
||
<el-tag type="success" v-if="sheet.tradeMethod === 0" size="small" class="ml-20">自主交易</el-tag>
|
||
<view class="ml-20 flex justify-start items-center">
|
||
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||
<view class="text-main ">
|
||
<text class="mx-20">{{
|
||
(sheet.quoteList && sheet.quoteList.length > 0) ? sheet.quoteList.length : 0
|
||
}}
|
||
</text>
|
||
<text>家已报价</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="flex justify-end items-end"
|
||
v-if="sheet.answerEndTime && dayjs(sheet.answerEndTime).diff(dayjs(), 'second') > 0">
|
||
<text>距离报价结束还有:</text>
|
||
<view class="border-main countdown text-main">{{
|
||
dayjs(sheet.answerEndTime).diff(dayjs(), 'day')
|
||
}}
|
||
</view>
|
||
<text>天</text>
|
||
<view class="border-main countdown text-main">
|
||
{{ (dayjs(sheet.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
|
||
</view>
|
||
<text>时</text>
|
||
</view>
|
||
</view>
|
||
<view class="my-25 flex justify-between items-center pb-20 border-bottom">
|
||
<view class="flex justify-start items-center">
|
||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||
<text class="ml-15 text-gray" v-if="sheet.user">
|
||
{{
|
||
sheet.user.accountType === 1 ? sheet.user.person.personName.replace(/^(.).*$/, "$1**") :
|
||
((sheet.user && sheet.user.company) ? sheet.user.company.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : '')
|
||
}}
|
||
</text>
|
||
</view>
|
||
<template v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId">
|
||
<el-button type="primary" disabled
|
||
v-if="sheet.status > 0">此询价单采购商已确认合作方,请您及时查看平台信息发布,及时报价,以免错过商机。
|
||
</el-button>
|
||
<el-button type="primary" @click.native="toQuote" :disabled="sheet.disabled"
|
||
v-else>{{
|
||
sheet.disabled ? '已超时无法报价' : '我要报价'
|
||
}}
|
||
</el-button>
|
||
</template>
|
||
<template v-else>
|
||
<el-button type="primary" @click.native="openQuoteDialog">查看收到的申请报价
|
||
</el-button>
|
||
</template>
|
||
</view>
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
主要商品
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-20" v-if="sheet.fillType === 1">{{
|
||
batchProductNames
|
||
}}
|
||
</view>
|
||
<view v-else class="mt-20">
|
||
<el-descriptions :title="item.goodsName" v-for="(item, index) in sheet.productList" :key="index"
|
||
class="pb-20 border-bottom">
|
||
<el-descriptions-item :label="model.label" v-for="(model, modelIndex) in item.model"
|
||
:key="modelIndex">{{ model.value }}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="单价长度">{{
|
||
item.singleLength ? item.singleLength : ''
|
||
}}{{ item.singleLengthUnit ? item.singleLengthUnit : '' }}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="交货服务">{{
|
||
item.deliverService ? item.deliverService : '无'
|
||
}}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="采购数量">{{
|
||
item.procureNumber ? item.procureNumber : ''
|
||
}}{{ item.procureUnit ? item.procureUnit : '' }}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="计价形式">{{
|
||
item.pricingForm ? item.pricingForm : '无'
|
||
}}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="交货时限">{{
|
||
sheet.deliveryTime ? sheet.deliveryTime : '无'
|
||
}}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="交货地点">{{
|
||
sheet.fullAddress
|
||
}}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="装货、卸货费用承担">{{
|
||
item.loadPaidBy ? item.loadPaidBy : '无'
|
||
}}
|
||
</el-descriptions-item>
|
||
</el-descriptions>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
上传的附件
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<template v-if="sheet.files">
|
||
<view class="mt-15 mr-15" v-for="(item, index) in sheet.files" :key="index">
|
||
<file-type :item="item" @click.native="openFile(item)"/>
|
||
</view>
|
||
</template>
|
||
<template v-if="sheet.multiFiles">
|
||
<view class="mt-15 mr-15" v-for="(item, index) in sheet.multiFiles" :key="index">
|
||
<template v-if="['doc', 'docx'].includes(item.split('.').pop())">
|
||
<file-word theme="outline" class="pointer" size="40" fill="#4a90e2" strokeLinecap="square"
|
||
@click.native="openDownload(item)"/>
|
||
</template>
|
||
<template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">
|
||
<file-excel theme="outline" class="pointer" size="40" fill="#417505" strokeLinecap="square"
|
||
@click.native="openDownload(item)"/>
|
||
</template>
|
||
<template v-else-if="['pdf'].includes(item.split('.').pop())">
|
||
<file-pdf-one theme="outline" class="pointer" size="40" fill="#f5a623"
|
||
strokeLinecap="square"
|
||
@click.native="openDownload(item)"/>
|
||
</template>
|
||
<template v-else>
|
||
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
|
||
:preview-src-list="[item]"/>
|
||
</template>
|
||
</view>
|
||
</template>
|
||
</view>
|
||
|
||
<view class="item-wrap" v-if="sheet.remark">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
采购商其他要求
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">{{ sheet.remark }}</view>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
发票要求
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">是否含税:{{ sheet.invoice ? '含税' : '不含税' }}</view>
|
||
<template v-if="sheet.invoice">
|
||
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[sheet.writeInvoiceTime] }}</view>
|
||
|
||
<view class="mt-15" v-if="sheet.invoiceOther">税票要求:{{ sheet.invoiceOther }}</view>
|
||
<template v-else>
|
||
<view class="mt-15">纳税人身份:{{ sheet.taxType ? sheet.taxType : '无' }}</view>
|
||
<view class="mt-15">发票种类:{{ sheet.invoiceType ? sheet.invoiceType : '无' }}</view>
|
||
<view class="mt-15">税率:{{ sheet.taxRate ? sheet.taxRate : '无' }}</view>
|
||
</template>
|
||
</template>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
运输要求
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15" v-if="sheet.transportDocuments && sheet.transportDocuments.length > 0">
|
||
随货资料:{{ sheet.transportDocuments.join() }}
|
||
</view>
|
||
<view class="mt-15" v-if="sheet.otherTransportDocuments">其他要求:{{
|
||
sheet.otherTransportDocuments
|
||
}}
|
||
</view>
|
||
<view class="mt-15">运输限制要求:{{ sheet.transportLimit ? '有' : '无' }}</view>
|
||
<view class="mt-15" v-if="sheet.transportLimit && sheet.otherTransportRequest">
|
||
运输限制说明:{{ sheet.otherTransportRequest }}
|
||
</view>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
交易模式
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">{{ sheet.tradeMethod === 0 ? '自主交易' : '金久信公证' }}</view>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
交易说明
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">付款方式:{{ PROCESS_PAY_METHOD[sheet.payMethod] }}{{
|
||
sheet.payMethod === 0 ? `${sheet.advancePayRate}%货到付全款` : ''
|
||
}}{{
|
||
sheet.payMethod === 3 ? `${sheet.reputationPayDay}天` :
|
||
(sheet.payMethod === 4 ? `:${sheet.otherPayMethod}` : '')
|
||
}}
|
||
</view>
|
||
<view class="mt-15">报价形式:{{ sheet.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
|
||
<view class="mt-15">报价期限:
|
||
<text v-if="sheet.answerStartTime && sheet.answerEndTime">{{
|
||
dayjs(sheet.answerStartTime).format('YYYY-MM-DD')
|
||
}}~{{ dayjs(sheet.answerEndTime).format('YYYY-MM-DD') }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
采购商信息
|
||
</view>
|
||
<text class="tip-text ml-10">(注册可查看信息)</text>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">项目名称:{{ sheet.projectName ? sheet.projectName : '' }}</view>
|
||
<view class="mt-15">项目地址:{{ sheet.fullAddress }}</view>
|
||
<template v-if="canViewBuyerInfo">
|
||
<view class="mt-15" v-if="sheet.companyName">公司信息:{{
|
||
sheet.companyName ? sheet.companyName : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15" v-if="sheet.companyMobile">公司联系方式:{{
|
||
sheet.companyMobile ? sheet.companyMobile : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15">授权业务咨询人:{{
|
||
sheet.businessName ? sheet.businessName : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15">业务咨询联系方式:{{
|
||
sheet.businessMobile ? sheet.businessMobile : ''
|
||
}}
|
||
</view>
|
||
</template>
|
||
<template v-else>
|
||
<view class="mt-15" v-if="sheet.companyName">公司信息:{{
|
||
sheet.companyName ? sheet.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15" v-if="sheet.companyMobile">公司联系方式:{{
|
||
sheet.companyMobile ? sheet.companyMobile.replace(/^(.)(.)(.).*$/, "$1$2$3****") : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15">授权业务咨询人:{{
|
||
sheet.businessName ? sheet.businessName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15">业务咨询联系方式:{{
|
||
sheet.businessMobile ? sheet.businessMobile.replace(/^(.)(.)(.).*$/, "$1$2$3****") : ''
|
||
}}
|
||
</view>
|
||
</template>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
交易保证金要求
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">{{ sheet.earnestMoney ? parseFloat(sheet.earnestMoney).toFixed(2) : '无' }}</view>
|
||
</view>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
签约模式
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">{{
|
||
sheet.signMethod === 0 ? '线上签约-标准合同' : (sheet.signMethod !== 1 ? '线上签约-双方协商合同' : '线下签约')
|
||
}}
|
||
</view>
|
||
</view>
|
||
|
||
<view class="item-wrap" v-if="sheet.signMethod === 0">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
合同条款
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<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 class="mt-15">供应方补充条款:</view>-->
|
||
</view>
|
||
|
||
<template v-else-if="sheet.signMethod === 2">
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-sheet-title">
|
||
<view class="form-title">
|
||
合同附件
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view v-for="(item, index) in sheet.contractAttachment" :key="index" class="mr-25 my-25">
|
||
<file-type :item="item" @click.native="openFile(item)"/>
|
||
</view>
|
||
</template>
|
||
|
||
<view class="item-wrap">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-info-title">
|
||
<view class="form-title">
|
||
{{ sheet.quoteList.length }}家已报价
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 报价列表 -->
|
||
<!-- <vk-data-table :data="sheet.quoteList" :columns="table1.columns"-->
|
||
<!-- :customRightBtns="table1.customRightBtns"></vk-data-table>-->
|
||
</view>
|
||
|
||
<view class="item-wrap" v-if="spotAdList.length > 0">
|
||
<view class="form-title-wrap">
|
||
<view class="goods-info-title">
|
||
<view class="form-title">
|
||
相关推荐
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="spot-ad-list">
|
||
<image v-for="(item, index) in spotAdList" :key="index"
|
||
@click="adJump(item)"
|
||
class="spot-ad-item pointer"
|
||
:src="item.swiper"
|
||
mode="aspectFill"/>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<common-footer></common-footer>
|
||
|
||
<el-dialog :visible.sync="showDialog" width="70%" :show-close="false">
|
||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||
<text>收到的报价</text>
|
||
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
|
||
</view>
|
||
<view class="mt-15">
|
||
<view class="request-header">
|
||
<text class="flex-1">供应商</text>
|
||
<text class="flex-1">{{ sheet.type === 2 && sheet.rentType === 1 ? '询价' : '报价' }}时间</text>
|
||
<text class="flex-1">联系方式</text>
|
||
<text class="flex-1">{{ sheet.type === 2 && sheet.rentType === 1 ? '询价内容' : '报价' }}</text>
|
||
<text class="flex-1">附件</text>
|
||
<text class="flex-1">详情</text>
|
||
<text class="flex-1">供应商合同补充条款</text>
|
||
<text class="flex-1">操作</text>
|
||
</view>
|
||
<view class="quote" v-for="(item, index) in sheet.quoteList" :key="index">
|
||
<text class="flex-1">{{ item.subjectName }}</text>
|
||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||
<text class="flex-1">{{ item.subjectMobile }}</text>
|
||
<text class="flex-1">{{ item.totalPrice }}{{ sheet.type === 2 && sheet.rentType === 1 ? '' : '元' }}</text>
|
||
<view class="flex-1">
|
||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in item.files" :key="fileIndex">
|
||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||
</view>
|
||
</view>
|
||
<text class="flex-1">{{ item.remark }}</text>
|
||
<text class="flex-1">{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||
<text class="flex-1">
|
||
<el-button type="primary" v-if="sheet.status === 0" @click.native="confirm(item)">选择
|
||
</el-button>
|
||
<el-button type="primary" v-else>已选择供应商
|
||
</el-button>
|
||
</text>
|
||
</view>
|
||
</view>
|
||
</el-dialog>
|
||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||
</el-dialog>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {BuildingOne, IdCard, FileWord, FileExcel, FilePdfOne} from "@icon-park/vue";
|
||
import dayjs from "dayjs";
|
||
import {WRITE_INVOICE_TIME, INVOICE_TYPE, PROCESS_PAY_METHOD} from '@/util'
|
||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||
import FileType from "../../components/file-type/file-type.vue";
|
||
|
||
export default {
|
||
components: {FileType, BuildingOne, IdCard, FileWord, FileExcel, FilePdfOne},
|
||
data() {
|
||
return {
|
||
userInfo: {
|
||
userLevel: 0
|
||
},
|
||
accountNum: 0,
|
||
spotAdList: [],
|
||
provinceData: provinces,
|
||
cityData: citys,
|
||
areaData: areas,
|
||
WRITE_INVOICE_TIME,
|
||
INVOICE_TYPE,
|
||
PROCESS_PAY_METHOD,
|
||
enquiryId: undefined,
|
||
showDialog: false,
|
||
showImagePreview: false,
|
||
previewImageUrl: '',
|
||
hasQuote: false,
|
||
productList: [],
|
||
sheetTitle: '',
|
||
sheet: {
|
||
user: {},
|
||
productList: [],
|
||
transportDocuments: [],
|
||
quoteList: [],
|
||
files: [],
|
||
multiFiles: [],
|
||
otherCate: null,
|
||
contractAttachment: []
|
||
},
|
||
table1: {
|
||
// 表格数据
|
||
data: [],
|
||
// 表格字段显示规则
|
||
columns: [{
|
||
key: "subjectName",
|
||
title: "供应商",
|
||
type: "text",
|
||
width: 300
|
||
},
|
||
{
|
||
key: "_add_time_str",
|
||
title: "报价时间",
|
||
type: "text",
|
||
width: 200
|
||
},
|
||
{
|
||
key: "subjectMobile",
|
||
title: "联系方式",
|
||
type: "text",
|
||
width: 120,
|
||
formatter: (val, row, column, index) => {
|
||
let str = val
|
||
if (row.managerMobile) {
|
||
str = row.managerMobile
|
||
}
|
||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId || row.userId == vk.getVuex('$user.userInfo._id')) {
|
||
return str
|
||
}
|
||
return vk.pubfn.hidden(str, 3, 4);
|
||
}
|
||
},
|
||
{
|
||
key: "totalPrice",
|
||
title: "报价",
|
||
type: "textarea",
|
||
width: 130,
|
||
formatter: (val, row, column, index) => {
|
||
let str = val
|
||
if (row.managerMobile) {
|
||
str = row.managerMobile
|
||
}
|
||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId || row.userId == vk.getVuex('$user.userInfo._id')) {
|
||
return `${val}元`
|
||
}
|
||
return "******";
|
||
}
|
||
},
|
||
{
|
||
key: "remark",
|
||
title: "详情",
|
||
type: "text",
|
||
formatter: (val, row, column, index) => {
|
||
let str = val
|
||
if (row.managerMobile) {
|
||
str = row.managerMobile
|
||
}
|
||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId || row.userId == vk.getVuex('$user.userInfo._id')) {
|
||
return val
|
||
}
|
||
return "******";
|
||
}
|
||
}
|
||
|
||
],
|
||
},
|
||
};
|
||
},
|
||
onLoad(options = {}) {
|
||
const {id} = options
|
||
if (!id) {
|
||
vk.navigateTo('/pages/enquiry/list');
|
||
return
|
||
}
|
||
this.enquiryId = id
|
||
this.getEnquiryDetail()
|
||
this.getUserInfo()
|
||
},
|
||
computed: {
|
||
isLoggedIn() {
|
||
return !!vk.getVuex('$user.userInfo._id')
|
||
},
|
||
canViewBuyerInfo() {
|
||
const remainQuoteNum = Number(this.userInfo && this.userInfo.remainQuoteNum) || 0
|
||
const quoteExpiredAt = this.userInfo && this.userInfo.quoteExpiredAt
|
||
const monthlyQuoteActive = !!(quoteExpiredAt && dayjs(quoteExpiredAt).isAfter(dayjs()))
|
||
return this.isLoggedIn && (
|
||
this.sheet.isMine ||
|
||
this.sheet.hasQuote ||
|
||
Number(this.userInfo.userLevel) > 0 ||
|
||
remainQuoteNum > 0 ||
|
||
monthlyQuoteActive
|
||
)
|
||
},
|
||
batchProductNames() {
|
||
if (this.sheet.otherCate) return this.sheet.otherCate
|
||
return this.sheet.productList.map(item => item.goodsName + `${item.materialQuality ? `(${item.materialQuality})` : ''}`).join(',')
|
||
}
|
||
},
|
||
methods: {
|
||
dayjs,
|
||
normalizeSheet(data = {}) {
|
||
return {
|
||
user: {},
|
||
productList: [],
|
||
transportDocuments: [],
|
||
quoteList: [],
|
||
files: [],
|
||
multiFiles: [],
|
||
otherCate: null,
|
||
contractAttachment: [],
|
||
...data,
|
||
user: data.user || {},
|
||
productList: Array.isArray(data.productList) ? data.productList : [],
|
||
transportDocuments: Array.isArray(data.transportDocuments) ? data.transportDocuments : [],
|
||
quoteList: Array.isArray(data.quoteList) ? data.quoteList : [],
|
||
files: Array.isArray(data.files) ? data.files : [],
|
||
multiFiles: Array.isArray(data.multiFiles) ? data.multiFiles : [],
|
||
contractAttachment: Array.isArray(data.contractAttachment) ? data.contractAttachment : []
|
||
}
|
||
},
|
||
async getUserInfo() {
|
||
if (!this.isLoggedIn) return
|
||
const {userInfo, accountNum} = await vk.callFunction({
|
||
url: 'user/kh/getMyUserInfo'
|
||
})
|
||
this.userInfo = userInfo
|
||
this.accountNum = accountNum
|
||
},
|
||
/**
|
||
* 打开报价窗口
|
||
*/
|
||
openQuoteDialog() {
|
||
// const h = this.$createElement
|
||
// this.$confirm(h('div', {class: 'dialog-confirm-content'}, [
|
||
// h('p', '1、请您谨慎点击"选择",选择供应商后,系统将自动关闭您此条询价信息,无法返回,只能再次发布询价信息;'),
|
||
// h('p', '2、点击"选择"前,您可通过供应商联系方式,仔细商讨:商品明细、数量、单价、执行标准、交货方式、交货期、验收方式、合同条款等细节关键题确认,各种交易细节无误后要求供应商进行最终报价;'),
|
||
// h('p', '3、您承诺对此次交易的内容用途已经完全了解并知悉经过严格仔细审核后实施,此次交易为合法经营,如违反相关法律规定,您将承担全部责任,与平台无关。您确认以上描述无误后请点击"选择"。')
|
||
// ]), '重点提示', {
|
||
// confirmButtonText: '同意悉知',
|
||
// cancelButtonText: '取消',
|
||
// type: 'warning'
|
||
// }).then(() => {
|
||
this.showDialog = true
|
||
// }).catch(() => {})
|
||
},
|
||
openQuoteServiceFeeDialog() {
|
||
const rate = this.sheet.notaryServiceRate || 0.1
|
||
return this.$confirm(`若您成功签约交易,平台将收取总交易金额 ${rate}%服务费,如您存在利用系统漏洞恶意逃避支付服务费的情况,平台有将您的失信行为进行公布,情况严重的平台予以劝退。
|
||
并有权依法追回平台服务费。您承诺此次交易为合法经营,如违反相关法律法规您将承担全部任与平台无关。您已经完全理解并知悉,您不同意请点击'取消',取消报价,您同意以上约定请点击'同意并知悉'。`, '重要提示', {
|
||
confirmButtonText: '同意并知悉',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
})
|
||
},
|
||
/**
|
||
* 打开报价窗口
|
||
*/
|
||
async toQuote() {
|
||
if (!this.userInfo.fadadaConfirm || [-1, 2].includes(this.userInfo.authStatus)) {
|
||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||
})
|
||
} else if (vk.pubfn.isNull(this.userInfo.businessCard)) {
|
||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||
})
|
||
} else if (this.accountNum === 0) {
|
||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||
})
|
||
} else {
|
||
if (this.userInfo.businessCard.status !== 1) {
|
||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
})
|
||
return
|
||
}
|
||
if (this.sheet.earnestMoney && this.sheet.earnestMoney > 0 && this.userInfo.paidEnsure < this.sheet.earnestMoney) {
|
||
this.$confirm('保证金不足,是否去充值保证金?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.navigateTo({url: '/pages/user/user?menu=grade'});
|
||
})
|
||
return
|
||
}
|
||
if (this.sheet.tradeMethod === 1) {
|
||
try {
|
||
await this.openQuoteServiceFeeDialog()
|
||
} catch (e) {
|
||
return
|
||
}
|
||
}
|
||
vk.navigateTo('/pages/enquiry/quote?enquiryId=' + this.enquiryId);
|
||
}
|
||
},
|
||
/**
|
||
* 获取询价单详情
|
||
*/
|
||
getEnquiryDetail() {
|
||
vk.callFunction({
|
||
url: 'client/enquiry/sheet/pub/getDetail',
|
||
title: '请求中...',
|
||
data: {
|
||
_id: this.enquiryId
|
||
},
|
||
success: (res) => {
|
||
this.sheet = this.normalizeSheet(res.data)
|
||
this.sheet.disabled = (!this.sheet.answerEndTime || dayjs(this.sheet.answerEndTime).isBefore(dayjs()))
|
||
this.sheet.fullAddress = ''
|
||
if (this.sheet.deliveryTime) this.sheet.deliveryTime = dayjs(this.sheet.deliveryTime).format('YYYY-MM-DD HH:mm:ss')
|
||
this.sheet.fullAddress = (this.sheet.addressRegion && this.sheet.addressRegion.province) ? `${this.sheet.addressRegion.province.name}${this.sheet.addressRegion.city.name}${this.sheet.addressRegion.area.name}` : ''
|
||
if (this.sheet.addressRegion && this.sheet.addressRegion.addressDetail) {
|
||
this.sheet.fullAddress += this.sheet.addressRegion.addressDetail
|
||
}
|
||
this.getSpotAd()
|
||
}
|
||
});
|
||
},
|
||
async getSpotAd() {
|
||
this.spotAdList = []
|
||
const res = await vk.callFunction({
|
||
url: 'client/ad/pub/getList',
|
||
data: {
|
||
adKey: 37,
|
||
spotGoodsId: this.enquiryId
|
||
}
|
||
})
|
||
if (res.data) this.spotAdList = res.data
|
||
},
|
||
adJump(item) {
|
||
if (item.spotGoodsId) {
|
||
if (item.spotGoodsId === this.enquiryId) return
|
||
vk.navigateTo(`/pages/enquiry/detail?id=${item.spotGoodsId}`)
|
||
} else if (item.type === 'goods' && item.goodsId) {
|
||
vk.navigateTo(`/pages/index/shop/detail?id=${item.goodsId}`)
|
||
} else if (item.companyId) {
|
||
vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)
|
||
}
|
||
},
|
||
showNotaryBusinessTip() {
|
||
this.$alert('请您先至个人中心-卖家中心-金久信公正银联资料,完成银联资料收集,并联系金久信客服开通功能。才能进行金久信公正交易', '温馨提示', {
|
||
confirmButtonText: '确定'
|
||
})
|
||
},
|
||
showSelectQuoteTip(item) {
|
||
const h = this.$createElement
|
||
this.$confirm(h('div', {class: 'dialog-confirm-content'}, [
|
||
h('p', '1、请您谨慎点击"选择",选择供应商后,系统将自动关闭您此条询价信息,无法返回,只能再次发布询价信息;'),
|
||
h('p', '2、点击"选择"前,您可通过供应商联系方式,仔细商讨:商品明细、数量、单价、执行标准、交货方式、交货期、验收方式、合同条款等细节问题确认,各种交易细节无误后要求供应商进行最终报价;'),
|
||
h('p', '3、您承诺对此次交易的内容用途已经完全了解并知悉经过严格仔细审核后实施,此次交易为合法经营,如违反相关法律规定,您将承担全部责任,与平台无关。您确认以上描述无误后请点击"选择"。')
|
||
]), '重点提示', {
|
||
confirmButtonText: '同意悉知',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
this.doConfirm(item)
|
||
}).catch(() => {})
|
||
},
|
||
doConfirm(item) {
|
||
vk.callFunction({
|
||
url: 'client/enquiry/quote/kh/confirmQuote',
|
||
title: '请求中...',
|
||
data: {
|
||
quoteId: item._id,
|
||
},
|
||
success: (data) => {
|
||
this.showDialog = false
|
||
if (this.sheet.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||
else {
|
||
if (this.sheet.signMethod === 1) vk.navigateTo('/pages/store/buyer')
|
||
else vk.navigateTo('/pages/contract/index?tab=0')
|
||
}
|
||
this.$message({
|
||
type: 'success',
|
||
message: '报价确认成功'
|
||
})
|
||
}
|
||
});
|
||
},
|
||
confirm(item) {
|
||
if (this.sheet.tradeMethod === 1 && (!this.sheet.user || this.sheet.user.isNotaryBusiness !== 1)) {
|
||
this.showNotaryBusinessTip()
|
||
return
|
||
}
|
||
this.showSelectQuoteTip(item)
|
||
},
|
||
getFileExt(url = "") {
|
||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||
return match ? match[1].toLowerCase() : ""
|
||
},
|
||
isImageFile(url) {
|
||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||
},
|
||
isPdfFile(url) {
|
||
return this.getFileExt(url) === "pdf"
|
||
},
|
||
isOfficeFile(url) {
|
||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||
},
|
||
getOfficePreviewUrl(url) {
|
||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||
},
|
||
previewFile(url) {
|
||
if (!url) return
|
||
if (this.isImageFile(url)) {
|
||
this.previewImageUrl = url
|
||
this.showImagePreview = true
|
||
return
|
||
}
|
||
if (this.isPdfFile(url)) {
|
||
window.open(url, "_blank")
|
||
return
|
||
}
|
||
if (this.isOfficeFile(url)) {
|
||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||
return
|
||
}
|
||
window.open(url, "_blank")
|
||
},
|
||
openDownload(url) {
|
||
this.previewFile(url)
|
||
},
|
||
openFile(url) {
|
||
this.previewFile(url)
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.page-main {
|
||
width: 1200px;
|
||
margin: 20px auto;
|
||
background-color: #FFFFFF;
|
||
padding: 20px;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.countdown {
|
||
padding: 2px 5px;
|
||
margin: 0 5px;
|
||
}
|
||
|
||
.item-wrap {
|
||
margin: 24px 0;
|
||
|
||
.form-title-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
|
||
.goods-info-title {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
.form-title {
|
||
padding-left: 10px;
|
||
color: #A92924;
|
||
font-size: 18px;
|
||
line-height: 18px;
|
||
border-left: 4px solid #A92924;
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
.tip-text {
|
||
color: #f56c6c;
|
||
}
|
||
|
||
.request-header {
|
||
border: 1px solid #EDEDED;
|
||
background-color: #FFF8F1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 15px;
|
||
margin-top: 30px;
|
||
|
||
text {
|
||
text-align: center;
|
||
}
|
||
}
|
||
|
||
.quote {
|
||
border-left: 1px solid #EDEDED;
|
||
border-right: 1px solid #EDEDED;
|
||
border-bottom: 1px solid #EDEDED;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 15px;
|
||
|
||
text {
|
||
text-align: center;
|
||
}
|
||
}
|
||
|
||
.spot-ad-list {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 20px;
|
||
margin-top: 15px;
|
||
}
|
||
|
||
.spot-ad-item {
|
||
width: calc(50% - 10px);
|
||
height: 100px;
|
||
}
|
||
|
||
.preview-image {
|
||
display: block;
|
||
max-width: 100%;
|
||
max-height: 75vh;
|
||
margin: 0 auto;
|
||
}
|
||
</style>
|