703 lines
33 KiB
Vue
703 lines
33 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.company.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/,"$1$2***$3$4$5$6")
|
||
}}
|
||
</text>
|
||
</view>
|
||
<el-button type="primary" @click.native="toQuote" :disabled="sheet.disabled"
|
||
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId && sheet.status === 0">{{
|
||
sheet.disabled ? '已超时无法报价' : '我要报价'
|
||
}}
|
||
</el-button>
|
||
<el-button type="primary" @click.native="showDialog = true"
|
||
v-else-if="vk.getVuex('$user.userInfo._id') === sheet.userId">查看收到的申请报价
|
||
</el-button>
|
||
</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">{{-->
|
||
<!-- sheet.productList.map(item => item.goodsName + `${item.materialQuality ? `(${item.materialQuality})` : ''}`).join(',')-->
|
||
<!-- }}-->
|
||
<!-- </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="openDownload(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>
|
||
<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>
|
||
</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>
|
||
</view>
|
||
</view>
|
||
<view class="mt-15">项目名称:{{ sheet.projectName ? sheet.projectName : '' }}</view>
|
||
<view class="mt-15">项目地址:{{ sheet.fullAddress }}</view>
|
||
<template v-if="sheet.isMine || sheet.hasQuote || userInfo.userLevel > 0">
|
||
<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(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15">授权业务咨询人:{{
|
||
sheet.businessName ? sheet.businessName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||
}}
|
||
</view>
|
||
<view class="mt-15">业务咨询联系方式:{{
|
||
sheet.businessMobile ? sheet.businessMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
|
||
}}
|
||
</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 ? 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="openDownload(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>
|
||
|
||
<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="openDownload(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>
|
||
</text>
|
||
</view>
|
||
</view>
|
||
</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,
|
||
provinceData: provinces,
|
||
cityData: citys,
|
||
areaData: areas,
|
||
WRITE_INVOICE_TIME,
|
||
INVOICE_TYPE,
|
||
PROCESS_PAY_METHOD,
|
||
enquiryId: undefined,
|
||
showDialog: false,
|
||
hasQuote: false,
|
||
productList: [],
|
||
sheetTitle: '',
|
||
sheet: {
|
||
user: {},
|
||
productList: [],
|
||
transportDocuments: []
|
||
},
|
||
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()
|
||
},
|
||
methods: {
|
||
dayjs,
|
||
async getUserInfo(){
|
||
const {userInfo, accountNum} = await vk.callFunction({
|
||
url: 'user/kh/getMyUserInfo'
|
||
})
|
||
this.userInfo = userInfo
|
||
this.accountNum = accountNum
|
||
},
|
||
/**
|
||
* 打开报价窗口
|
||
*/
|
||
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
|
||
}
|
||
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 = 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.addressDetail) this.list.rows[index].fullAddress += this.sheet.addressRegion.addressDetail
|
||
}
|
||
});
|
||
},
|
||
confirm(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: '报价确认成功'
|
||
})
|
||
}
|
||
});
|
||
},
|
||
openDownload(url) {
|
||
if (this.sheet.isMine || this.sheet.hasQuote || this.userInfo.userLevel > 0)
|
||
window.open(url)
|
||
else{
|
||
this.$message({
|
||
message: '请先完成报价/升级会员'
|
||
})
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@import "@/common/css/app.scss";
|
||
|
||
.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: $--color-primary;
|
||
font-size: 18px;
|
||
line-height: 18px;
|
||
border-left: 4px solid $--color-primary;
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
.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;
|
||
}
|
||
}
|
||
</style> |