20261008
This commit is contained in:
+334
-130
@@ -16,12 +16,13 @@
|
||||
|
||||
<view class="page-main" v-if="sheet">
|
||||
<view class="flex justify-between items-center">
|
||||
<text class="text-gray">加工询价单编号:{{ sheet.orderNo }}</text>
|
||||
<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 ">
|
||||
@@ -34,15 +35,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-end"
|
||||
v-if="sheet.answerEndTime && dayjs().diff(dayjs(sheet.answerEndTime), 'second') > 0">
|
||||
v-if="sheet.answerEndTime && dayjs(sheet.answerEndTime).diff(dayjs(), 'second') > 0">
|
||||
<text>距离报价结束还有:</text>
|
||||
<view class="border-main countdown text-main">{{
|
||||
dayjs().diff(dayjs(sheet.answerEndTime), 'day')
|
||||
dayjs(sheet.answerEndTime).diff(dayjs(), 'day')
|
||||
}}
|
||||
</view>
|
||||
<text>天</text>
|
||||
<view class="border-main countdown text-main">
|
||||
{{ (dayjs().diff(dayjs(sheet.answerEndTime), 'hour')) % 24 }}
|
||||
{{ (dayjs(sheet.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
|
||||
</view>
|
||||
<text>时</text>
|
||||
</view>
|
||||
@@ -50,19 +51,71 @@
|
||||
<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">
|
||||
<text class="ml-15 text-gray" v-if="sheet.user">
|
||||
{{
|
||||
sheet.user.accountType === 1 ? sheet.user.person.personName : sheet.user.company.companyName
|
||||
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"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId && sheet.status === 0">我要报价
|
||||
<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">
|
||||
@@ -71,13 +124,35 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 mr-15" v-for="(item, index) in sheet.files" :key="index">
|
||||
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
|
||||
:preview-src-list="sheet.files"/>
|
||||
</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">
|
||||
<view class="item-wrap" v-if="sheet.remark">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
@@ -98,8 +173,13 @@
|
||||
</view>
|
||||
<view class="mt-15">是否含税:{{ sheet.invoice ? '含税' : '不含税' }}</view>
|
||||
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[sheet.writeInvoiceTime] }}</view>
|
||||
<view class="mt-15">发票种类:{{ INVOICE_TYPE[sheet.invoiceType] }}</view>
|
||||
<view class="mt-15">其他要求:{{ sheet.invoiceOther }}</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">
|
||||
@@ -110,9 +190,28 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">随货资料:{{ sheet.transportDocuments.join() }}</view>
|
||||
<view class="mt-15">其他要求:{{ sheet.otherTransportDocuments }}</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">
|
||||
@@ -123,7 +222,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">付款方式:{{ PROCESS_PAY_METHOD[sheet.payMethod] }}</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">{{
|
||||
@@ -134,6 +239,79 @@
|
||||
</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">
|
||||
@@ -157,21 +335,36 @@
|
||||
<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" title="adasda "
|
||||
:customRightBtns="table1.customRightBtns"></vk-data-table>
|
||||
<!-- <vk-data-table :data="sheet.quoteList" :columns="table1.columns"-->
|
||||
<!-- :customRightBtns="table1.customRightBtns"></vk-data-table>-->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -185,16 +378,26 @@
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-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">{{ 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 }}元</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>
|
||||
@@ -206,19 +409,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {BuildingOne, IdCard} from "@icon-park/vue";
|
||||
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: {BuildingOne, IdCard},
|
||||
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: {
|
||||
@@ -234,18 +449,7 @@ export default {
|
||||
key: "subjectName",
|
||||
title: "供应商",
|
||||
type: "text",
|
||||
width: 300,
|
||||
formatter: (val, row, column, index) => {
|
||||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId) {
|
||||
return val
|
||||
}
|
||||
if (row.accountType == 1) {
|
||||
return vk.pubfn.hidden(val, 1, 1);
|
||||
} else {
|
||||
return vk.pubfn.hidden(val, 2, 4);
|
||||
}
|
||||
}
|
||||
|
||||
width: 300
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
@@ -263,7 +467,7 @@ export default {
|
||||
if (row.managerMobile) {
|
||||
str = row.managerMobile
|
||||
}
|
||||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId) {
|
||||
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);
|
||||
@@ -279,103 +483,100 @@ export default {
|
||||
if (row.managerMobile) {
|
||||
str = row.managerMobile
|
||||
}
|
||||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId) {
|
||||
return val
|
||||
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 "******";
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '合同',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
show: (row) => {
|
||||
return vk.getVuex('$user.userInfo._id') == this.sheet.userId && row.status == 1
|
||||
},
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/contract/index');
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: '选择',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
show: (row) => {
|
||||
return vk.getVuex('$user.userInfo._id') == this.sheet.userId && row.status == 0
|
||||
},
|
||||
onClick: (item) => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId: item._id,
|
||||
},
|
||||
success: (data) => {
|
||||
vk.navigateTo('/pages/contract/index');
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '查看报价详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
disabled: (item) => {
|
||||
return vk.getVuex('$user.userInfo._id') != this.sheet.userId
|
||||
},
|
||||
onClick: (item) => {
|
||||
this.showDialog = true
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
const {
|
||||
id
|
||||
} = 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
|
||||
},
|
||||
/**
|
||||
* 打开报价窗口
|
||||
*/
|
||||
toQuote() {
|
||||
// 获取用户信息
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
const {
|
||||
userInfo
|
||||
} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
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',
|
||||
center: true
|
||||
}).then(res => {
|
||||
vk.navigateTo('/pages/enquiry/quote?enquiryId=' + this.enquiryId);
|
||||
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);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
@@ -388,23 +589,12 @@ export default {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
const {
|
||||
productList
|
||||
} = res.data
|
||||
let title = []
|
||||
productList.forEach(item => {
|
||||
const keys = Object.keys(item.extraAttributes)
|
||||
keys.forEach(citem => {
|
||||
item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
citem])
|
||||
})
|
||||
title.push(item.goodsName)
|
||||
})
|
||||
this.productList = productList
|
||||
|
||||
delete res.data.productList
|
||||
|
||||
this.sheet = {...res.data, ...{title: title.join()}}
|
||||
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
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -416,13 +606,27 @@ export default {
|
||||
quoteId: item._id,
|
||||
},
|
||||
success: (data) => {
|
||||
vk.navigateTo('/pages/contract/index');
|
||||
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: '请先完成报价/升级会员'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user