20261008
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="border-bottom pt-20">
|
||||
<el-form ref="form" :model="form1" label-width="80px" :rules="form1.props.rules">
|
||||
<el-form ref="form" :model="form1" label-width="140px" :rules="form1.props.rules">
|
||||
<view class="flex flex-wrap justify-start items-start">
|
||||
<view class="w-25p">
|
||||
<el-form-item label="商品名称">
|
||||
@@ -15,49 +15,51 @@
|
||||
</el-form-item>
|
||||
</view>
|
||||
<view class="w-25p" v-for="(item, index) in goodsAttributes" :key="index">
|
||||
<el-form-item :label="item.label">
|
||||
<el-select v-model="form1.data.model[item.label]" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item, index) in item.values"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-if="goodsAttributes && goodsAttributes.length > 0">
|
||||
<el-form-item :label="item.label" v-if="item.label">
|
||||
<el-select v-model="form1.data.model[index].value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(value, valueIndex) in item.values" :key="valueIndex" :label="value"
|
||||
:value="value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="单件长度">
|
||||
<el-input placeholder="请输入内容" v-model="form1.data.singleLength" class="input-with-select">
|
||||
<el-select v-model="form1.data.singleLengthUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单件长度')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单件长度').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="材质">
|
||||
<el-select v-model="form1.data.materialQuality" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '材质')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '材质').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="10">-->
|
||||
<!-- <el-form-item label="单件长度">-->
|
||||
<!-- <el-input placeholder="请输入内容" v-model="form1.data.singleLength" class="input-with-select"-->
|
||||
<!-- type="number">-->
|
||||
<!-- <template slot="append">米</template>-->
|
||||
<!--<!– <el-select v-model="form1.data.singleLengthUnit" slot="append" placeholder="请选择">–>-->
|
||||
<!--<!– <template v-if=" attributes.find(attr => attr.label === '单件长度')">–>-->
|
||||
<!--<!– <el-option–>-->
|
||||
<!--<!– v-for="(item, index) in attributes.find(attr => attr.label === '单件长度').options"–>-->
|
||||
<!--<!– :key="index"–>-->
|
||||
<!--<!– :label="item.label"–>-->
|
||||
<!--<!– :value="item.value">–>-->
|
||||
<!--<!– </el-option>–>-->
|
||||
<!--<!– </template>–>-->
|
||||
<!--<!– </el-select>–>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="6">-->
|
||||
<!-- <el-form-item label="尺寸">-->
|
||||
<!-- <el-select v-model="form1.data.materialQuality" placeholder="请选择">-->
|
||||
<!-- <template v-if=" attributes.find(attr => attr.label === '尺寸')">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="(item, index) in attributes.find(attr => attr.label === '尺寸').options"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交货服务">
|
||||
<el-select v-model="form1.data.deliverService" placeholder="请选择">
|
||||
@@ -72,24 +74,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购数量">
|
||||
<el-input v-model="form1.data.procureNumber" class="input-with-select">
|
||||
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单位')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单位').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计价形式">
|
||||
<el-select v-model="form1.data.pricingForm" placeholder="请选择">
|
||||
@@ -106,53 +90,38 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交货时限">
|
||||
<el-date-picker
|
||||
v-model="form1.data.deliveryTime"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购数量">
|
||||
<el-input v-model="form1.data.procureNumber" class="input-with-select" type="number">
|
||||
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单位')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单位').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item label="交货地点" class="ml-10">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
<!-- <span slot="prefix">省</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">市</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
|
||||
<template v-if="provinceIndex !== null && cityIndex !== null">
|
||||
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
|
||||
:key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">区/县</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form1.data.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="装货、卸货费用承担">
|
||||
<el-select v-model="form1.data.loadPaidBy" placeholder="请选择" style="width: 100%">
|
||||
<template v-if="attributes.find(attr => attr.label === '装货、卸货费用承担')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '装货、卸货费用承担').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.label">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</view>
|
||||
</template>
|
||||
@@ -183,6 +152,11 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
@@ -211,6 +185,7 @@ export default {
|
||||
deliverService: null,
|
||||
standard: null,
|
||||
pricingForm: null,
|
||||
loadPaidBy: '供货方承担装车费用,采购方承担卸货费用',
|
||||
deliveryTime: null,
|
||||
len: null,
|
||||
extraAttributes: {},
|
||||
@@ -277,8 +252,6 @@ export default {
|
||||
} else {
|
||||
this.form1.props.columns[2].columns = []
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -499,6 +472,7 @@ export default {
|
||||
getGoodsList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/template/pub/getList',
|
||||
pageSize: 500,
|
||||
title: '请求中',
|
||||
success: ({rows}) => {
|
||||
this.goodsList = rows
|
||||
@@ -506,10 +480,17 @@ export default {
|
||||
})
|
||||
},
|
||||
selectGoods(val) {
|
||||
this.form1.data.model = []
|
||||
this.goodsList.forEach(({_id, name, extraAttributes}) => {
|
||||
if (_id === val) {
|
||||
this.form1.data.goodsName = name
|
||||
this.goodsAttributes = extraAttributes
|
||||
this.goodsAttributes.forEach(attr => {
|
||||
if (attr.label) this.form1.data.model.push({
|
||||
label: attr.label,
|
||||
value: null
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -525,13 +506,19 @@ export default {
|
||||
|
||||
},
|
||||
watch: {
|
||||
"form1.data"(val) {
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
"form1.data": {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
}
|
||||
},
|
||||
value(val) {
|
||||
this.form1.data = val
|
||||
console.log("this.form1.data = val", val);
|
||||
value: {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
this.form1.data = val
|
||||
console.log("this.form1.data = val", val);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+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: '请先完成报价/升级会员'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+513
-493
File diff suppressed because it is too large
Load Diff
+219
-236
@@ -1,42 +1,43 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<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 url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布询价单</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
<view class="carousel">
|
||||
<!-- <el-carousel height="170px">-->
|
||||
<!-- <el-carousel-item v-for="item in 4" :key="item">-->
|
||||
<!-- <image class="carousel-img"-->
|
||||
<!-- src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"-->
|
||||
<!-- mode="aspectFill"></image>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="enquiry-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布询价单</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -45,237 +46,219 @@ import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
queryForm1: {
|
||||
formData: {
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
columns: [
|
||||
{key: "userId", title: "发布人ID", type: "text", width: 160, mode: "="},
|
||||
]
|
||||
},
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/sheet/pub/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('').then(() => {
|
||||
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "productList",
|
||||
title: "品名/材质",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item => `${item.goodsName}(${item.materialQuality})`).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "采购量",
|
||||
type: "text",
|
||||
width: 100,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item => item.procureNumber + item.procureUnit).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let fullAddress = ""
|
||||
try {
|
||||
let provinceIndex = 0, cityIndex = 0, areaIndex = 0
|
||||
this.provinceData.forEach((item, index) => {
|
||||
if (row.productList[0].addressRegion !== undefined && parseInt(row.productList[0].addressRegion[0]) === parseInt(item.code)) {
|
||||
provinceIndex = index
|
||||
fullAddress = item.name
|
||||
}
|
||||
})
|
||||
this.cityData[provinceIndex].forEach((item, index) => {
|
||||
if (row.productList[0].addressRegion !== undefined && parseInt(row.productList[0].addressRegion[1]) === parseInt(item.code)) {
|
||||
cityIndex = index
|
||||
fullAddress += item.name
|
||||
}
|
||||
})
|
||||
this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
|
||||
if (row.productList[0].addressRegion !== undefined && parseInt(row.productList[0].addressRegion[2]) === parseInt(item.code)) {
|
||||
areaIndex = index
|
||||
fullAddress += item.name
|
||||
}
|
||||
})
|
||||
fullAddress += row.productList[0].addressDetail
|
||||
} catch (err) {
|
||||
fullAddress = ""
|
||||
}
|
||||
|
||||
return fullAddress
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "user",
|
||||
title: "采购单位",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
if (val.accountType == 1) {
|
||||
return val.person.personName
|
||||
} else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
// {
|
||||
// key: "_add_time_srt",
|
||||
// title: "添加时间",
|
||||
// type: "time",
|
||||
// width: 160
|
||||
// },
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
queryForm1: {
|
||||
formData: {
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
columns: [
|
||||
{key: "userId", title: "发布人ID", type: "text", width: 160, mode: "="},
|
||||
]
|
||||
},
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/sheet/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('如果你要删除此条信息,之前其他客户填写的留言将无法查看', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "enquiryNo",
|
||||
title: "单号",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "title",
|
||||
title: "品名/材质",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "采购量",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
if (row.fillType === 0) return val.map(item => (item.procureNumber ? item.procureNumber : '') + (item.procureUnit ? item.procureUnit : '')).join("/")
|
||||
else return row.procureUnit ? `${row.procureNumber}${row.procureUnit}` : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "addressRegion",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
let fullAddress = (val && val.province) ? `${val.province.name}${val.city.name}${val.area.name}` : ''
|
||||
if (row.addressDetail) fullAddress += ` ${row.addressDetail}`
|
||||
return fullAddress
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "user",
|
||||
title: "采购单位",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
if (!val) return ''
|
||||
if (val.accountType == 1) {
|
||||
return val.person.personName
|
||||
} else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "quoteNum",
|
||||
title: "报价数",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}家已报价`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+217
-167
@@ -1,196 +1,246 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<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">
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="true"
|
||||
label-width="140px"
|
||||
@success="onFormSuccess"
|
||||
></vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
<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">
|
||||
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="enquiry" :id="enquiryId"/>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="false"
|
||||
:need-alert="false"
|
||||
:show-cancel="false"
|
||||
label-width="160px"
|
||||
@success="onFormSuccess"
|
||||
@fail="onFormFail"
|
||||
>
|
||||
<template v-slot:totalPrice>
|
||||
<el-input v-model="form1.data.totalPrice" placeholder="请输入货款总价"
|
||||
@change="formatNumber"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "number"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{required: true, message: "text不能为空", trigger: "change"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
sheet: null,
|
||||
enquiryId: null,
|
||||
reloaded: false,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null,
|
||||
totalPrice: null,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "货款总价(人民币:元)",
|
||||
type: "html"
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
enquiryId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = enquiryId
|
||||
this.form1.data.sheetId = enquiryId
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.navigateBack()
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
center: true
|
||||
}).then(res => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
res.data.productList.forEach(item => {
|
||||
item.unitPrice = 0
|
||||
const keys = Object.keys(item.extraAttributes)
|
||||
keys.forEach(citem => {
|
||||
item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
citem])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
// {key: "totalPrice", title: "货款总价(人民币:元)", type: "number", precision: 2},
|
||||
{
|
||||
key: "files",
|
||||
title: "附件",
|
||||
type: "file",
|
||||
accept: '.pdf',
|
||||
tips: '仅支持PDF文档,报价附件将生成标准合同附件,请认真审阅。'
|
||||
},
|
||||
{key: "remark", title: "报价单详情", type: "textarea"},
|
||||
{key: "supplierExt", title: "供应商合同补充条款", type: "textarea", autosize: {minRows: 4, maxRows: 10},},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
totalPrice: [
|
||||
{required: true, message: "货款总价不能为空", trigger: "change,blur"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
enquiryId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = enquiryId
|
||||
this.form1.data.sheetId = enquiryId
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.redirectTo({url: `/pages/enquiry/detail?id=${this.enquiryId}`})
|
||||
},
|
||||
onFormFail(data) {
|
||||
if (data.data.code === 12) {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.redirectTo({url: `/pages/user/user?menu=grade`})
|
||||
})
|
||||
} else {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.remainQuoteNum === 0 || !userInfo.remainQuoteNum) {
|
||||
|
||||
}
|
||||
|
||||
// this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning',
|
||||
// center: true
|
||||
// }).then(res => {
|
||||
//
|
||||
// })
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
formatNumber(e) {
|
||||
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.quote-form {
|
||||
width: 260px;
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,184 @@
|
||||
<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 url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布询价单</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/quote/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item.sheetId);
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "sheet.title",
|
||||
title: "供应标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}元`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
title: "状态",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '待选商'},
|
||||
{value: 1, label: '已被选商'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+1089
-886
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user