20261008
This commit is contained in:
@@ -0,0 +1,792 @@
|
||||
<template> <!-- 买家中心 -->
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<!-- 顶部 -->
|
||||
<uititle title="买家中心"></uititle>
|
||||
<!-- 选项卡 -->
|
||||
<view class="layout layout-tab flex justify-between align-center">
|
||||
<view :class="['tab', {active: menuIndex === 1}]" @click="handTab(1)">询价单</view>
|
||||
<view :class="['tab', {active: menuIndex === 0}]" @click="handTab(0)">加工单</view>
|
||||
<view :class="['tab', {active: menuIndex === 3}]" @click="handTab(3)">旧货</view>
|
||||
<view :class="['tab', {active: menuIndex === 2}]" @click="handTab(2)">自营询价</view>
|
||||
</view>
|
||||
<!-- 统计数量和操作按钮 -->
|
||||
<view class="layout layout-total bg-white">
|
||||
<view class="tp-box flex justify-center align-center" v-if="menuIndex !== 2">
|
||||
<view :class="['tp flex-1 text-center', {active: activeName === 'all'}]"
|
||||
@click="changeStatus('all')">全部
|
||||
</view>
|
||||
<view :class="['tp flex-1 text-center', {active: activeName === 'noQuote'}]"
|
||||
@click="changeStatus('noQuote')">
|
||||
待报价
|
||||
</view>
|
||||
<view :class="['tp flex-1 text-center', {active: activeName === 'notPick'}]"
|
||||
@click="changeStatus('notPick')">
|
||||
待选商
|
||||
</view>
|
||||
<view :class="['tp flex-1 text-center', {active: activeName === 'picked'}]"
|
||||
@click="changeStatus('picked')">
|
||||
已成交
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="search-box flex justify-between m-top-30">-->
|
||||
<!-- <view class="date" @click="isCalendar = true">-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="日期"-->
|
||||
<!-- v-model="calendarValue"-->
|
||||
<!-- suffixIcon="calendar"-->
|
||||
<!-- prefixIconStyle="font-size: 32px;color: #909399"-->
|
||||
<!-- :customStyle="inputClass"-->
|
||||
<!-- :disabled="true"-->
|
||||
<!-- disabledColor="#fff"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="width: 30rpx;"></view>-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="搜索编号或品名"-->
|
||||
<!-- suffixIcon="search"-->
|
||||
<!-- prefixIconStyle="font-size: 32px;color: #909399"-->
|
||||
<!-- :customStyle="inputClass"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</u-sticky>
|
||||
<!-- 列表 -->
|
||||
<view class="layout layout-list">
|
||||
<template v-if="menuIndex === 0">
|
||||
<view class="item" v-for="(item, index) in processList" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{ item.status === 0 ? '发布中' : '已选商' }}</view>
|
||||
<view class="ed m-left-10">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-center w-100p">
|
||||
<view class="text-main text-25 p-10">{{
|
||||
item.signMethod === 1 ? '线下签单' : '线上签约'
|
||||
}}
|
||||
</view>
|
||||
<view class="flex justify-start m-top-10" v-if="item.status === 1 && item.signMethod === 1">
|
||||
<view class="bao bao-2 m-left-10" @click="processChangeToOnlineSign(item._id, index)">
|
||||
切换线上交易
|
||||
</view>
|
||||
</view>
|
||||
<view @click="showProcessModal(item)">
|
||||
<u-text size="small" type="primary" :text="`收到${ item.quoteNum }个报价`"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text red m-top-10 font-bold">
|
||||
加工量:{{ item.num }}
|
||||
</view>
|
||||
<view class="text date m-top-10">
|
||||
<text class="m-right-20">交易编码:{{ item.orderNo }}</text>
|
||||
<text>{{ item._add_time_str }}发布</text>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<!-- <text @click="showProcessModal(item)">收到{{ item.quoteNum }}个报价</text>-->
|
||||
<!-- <view class="op-btn btn-2 btnredplain">编辑报价</view>-->
|
||||
<!-- 章 -->
|
||||
<view class="zhang">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 0"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-else></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center mt-10">
|
||||
<view class="mr-10">
|
||||
<u-button size="mini" type="success"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract"
|
||||
@click.native="$jump(`/pages/public/contract?tab=${item.contract ? (item.contract.status === 1 ? 1 : (item.contract.status === 2 ) ? 2 : 0) : 0}`)"
|
||||
>
|
||||
{{
|
||||
item.contract ? (item.contract.status === 1 ? '去签署合同' : (item.contract.status === 0) ? '去创建合同' : '查看合同')
|
||||
: '去创建合同'
|
||||
}}
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-10" v-if="item.status === 0">
|
||||
<u-button size="mini" type="error"
|
||||
@click.native="openCooperationDialog('process', item)"
|
||||
>查看意向合作列表
|
||||
</u-button>
|
||||
</view>
|
||||
<view v-else>
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="showOtherUser(item)"
|
||||
>查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="menuIndex === 1">
|
||||
<view class="item" v-for="(item, index) in enquiryList" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{ item.status === 0 ? '发布中' : '已选商' }}</view>
|
||||
<view class="ed m-left-10">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-center w-100p">
|
||||
<view class="text-main text-25 p-10">{{
|
||||
item.signMethod === 1 ? '线下签单' : '线上签约'
|
||||
}}
|
||||
</view>
|
||||
<view class="flex justify-start m-top-10" v-if="item.status === 1 && item.signMethod === 1">
|
||||
<view class="bao bao-2 m-left-10" @click="enquiryChangeToOnlineSign(item._id, index)">
|
||||
切换线上交易
|
||||
</view>
|
||||
</view>
|
||||
<view @click="showEnquiryModal(item)">
|
||||
<u-text size="small" type="primary" :text="`收到${ item.quoteNum }个报价`"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text red m-top-10">
|
||||
{{ item.productNum }} | {{ item.fullAddress }}
|
||||
</view>
|
||||
<view class="text date m-top-10">
|
||||
<text class="m-right-20">交易编码:{{ item.enquiryNo }}</text>
|
||||
<text>{{ item._add_time_str }}更新</text>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<!-- <view class="op-btn btn-2 btnredplain">编辑报价</view>-->
|
||||
<!-- 章 -->
|
||||
<view class="zhang">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 0"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-else></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center mt-15">
|
||||
<view class="mr-15" v-if="item.status === 1 && item.signMethod !== 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump(`/pages/public/contract?tab=${item.contract ? (item.contract.status === 1 ? 1 : (item.contract.status === 2 ) ? 2 : 0) : 0}`)">
|
||||
{{
|
||||
item.contract ? (item.contract.status === 1 ? '去签署合同' : (item.contract.status === 0) ? '去创建合同' : '查看合同')
|
||||
: '去创建合同'
|
||||
}}
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15" v-if="item.status === 2 && parseInt(item.tradeMethod) === 1">
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="$jump('/pages/shop/order')">去订单
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15" v-if="item.status === 0">
|
||||
<u-button size="mini" type="error"
|
||||
@click.native="openCooperationDialog('enquiry', item)"
|
||||
>查看意向合作列表
|
||||
</u-button>
|
||||
</view>
|
||||
<view v-else>
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="menuIndex === 2">
|
||||
<view class="item" v-for="(item, index) in selfSupportList.rows" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{
|
||||
item.status === 0 ? '待报价' : (item.status === 1 ? '待选商' : '已选商')
|
||||
}}
|
||||
</view>
|
||||
<view class="ed m-left-10">询价地址</view>
|
||||
</view>
|
||||
<view class="text red m-top-10">
|
||||
{{ item.province.name }}{{ item.city.name }}
|
||||
</view>
|
||||
<view class="text date m-top-10">
|
||||
<text>{{ item._add_time_str }}更新</text>
|
||||
</view>
|
||||
<view class="zhang" style="top: 40%">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 1"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-if="item.status === 2"></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center mt-15">
|
||||
<view class="mr-15" v-if="item.status !== 0 && item.signMethod !== 1 && item.contract">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump(`/pages/public/contract?tab=${item.contract ? (item.contract.status === 1 ? 1 : (item.contract.status === 2 ) ? 2 : 0) : 0}`)">
|
||||
{{
|
||||
item.contract ? (item.contract.status === 1 ? '去签署合同' : (item.contract.status === 0) ? '去创建合同' : '查看合同')
|
||||
: '去创建合同'
|
||||
}}
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15">
|
||||
<u-button size="mini" plain
|
||||
@click.native="showDetail(item)">查看详情
|
||||
</u-button>
|
||||
</view>
|
||||
<view>
|
||||
<u-button size="mini" type="success" plain v-if="item.status === 2"
|
||||
@click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="menuIndex === 3">
|
||||
<view class="item" v-for="(item, index) in oldList" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{ item.status === 0 ? '发布中' : '已选商' }}</view>
|
||||
<view class="ed m-left-10">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="text-main text-25 p-10">{{ item.signMethod === 1 ? '线下签单' : '线上签约' }}</view>
|
||||
<view class="flex justify-start m-top-10" v-if="item.status === 1 && item.signMethod === 1">
|
||||
<view class="bao bao-2 m-left-10" @click="oldChangeToOnlineSign(item._id, index)">切换线上交易
|
||||
</view>
|
||||
</view>
|
||||
<view class="text red m-top-10">
|
||||
{{ item.typeStr }} | {{
|
||||
(item.addressRegion && item.addressRegion.province) ? `${item.addressRegion.province.name}${item.addressRegion.city.name}${item.addressRegion.area.name}${item.addressDetail}` : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="text date m-top-10 flex flex-col justify-start items-start">
|
||||
<text class="m-right-20">交易编码:{{ item._id }}</text>
|
||||
<text>{{ item._add_time_str }}发布</text>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-end items-center">
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=1')">
|
||||
签署合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=2')">
|
||||
查看合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=0')">
|
||||
合同待创建
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15">
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<u-calendar
|
||||
:show="isCalendar"
|
||||
mode="single"
|
||||
@confirm="handCalendarConfirm"
|
||||
@close="isCalendar = false"
|
||||
></u-calendar>
|
||||
<enquiry-modal ref="enquiryModal"/>
|
||||
<process-modal ref="processModal"/>
|
||||
<self-support-modal ref="selfSupportModal"/>
|
||||
<contact-modal ref="contactModal"/>
|
||||
<u-modal
|
||||
:show="isCooperationTip"
|
||||
title="重点提示"
|
||||
confirmText="同意悉知"
|
||||
cancelText="取消"
|
||||
confirmColor="#A92924"
|
||||
showCancelButton
|
||||
@confirm="confirmCooperationDialog"
|
||||
@cancel="closeCooperationDialog"
|
||||
>
|
||||
<view class="cooperation-tip-content">
|
||||
<view v-for="(item, index) in cooperationTipList" :key="index" class="cooperation-tip-item">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import cmsearch from '@/components/common/search'
|
||||
import cmempty from '@/components/common/empty'
|
||||
import EnquiryModal from "./components/enquiryModal.vue";
|
||||
import ProcessModal from "./components/processModal.vue";
|
||||
import EnquiryData from "./components/enquiryData.vue";
|
||||
import SelfSupportModal from "./components/selfSupportModal.vue";
|
||||
import ContactModal from "@/components/ContactModal.vue";
|
||||
|
||||
const d = new Date()
|
||||
const year = d.getFullYear()
|
||||
let month = d.getMonth() + 1
|
||||
month = month < 10 ? `0${month}` : month
|
||||
const date = d.getDate()
|
||||
export default {
|
||||
components: {
|
||||
ContactModal,
|
||||
uititle,
|
||||
cmsearch,
|
||||
cmempty,
|
||||
EnquiryData,
|
||||
ProcessModal,
|
||||
EnquiryModal,
|
||||
SelfSupportModal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultDate: '${year}-${month}-${date}',
|
||||
isCalendar: false,
|
||||
calendarValue: '',
|
||||
inputClass: {
|
||||
height: '20px',
|
||||
borderRadius: 0,
|
||||
},
|
||||
tpIndex: 0,
|
||||
activeName: 'all',
|
||||
value: '',
|
||||
value1: '',
|
||||
options: [{
|
||||
value: '金久信自营',
|
||||
label: '金久信自营'
|
||||
}],
|
||||
menuIndex: 1,
|
||||
formData: {
|
||||
status: 0,
|
||||
tradeMethod: null
|
||||
},
|
||||
tableData: {},
|
||||
pageSize: 10,
|
||||
enquiryList: [],
|
||||
processList: [],
|
||||
selfSupportList: {},
|
||||
total: 0,
|
||||
notPickNum: 0,
|
||||
pickedNum: 0,
|
||||
noQuoteNum: 0,
|
||||
allNum: 0,
|
||||
userInfo: null,
|
||||
oldList: [],
|
||||
isCooperationTip: false,
|
||||
cooperationDialogType: '',
|
||||
cooperationDialogItem: null,
|
||||
cooperationTipList: [
|
||||
'1、请您谨慎点击"选择",选择供应商后,系统将自动关闭您此条询价信息,无法返回,只能再次发布询价信息;',
|
||||
'2、点击"选择"前,您可通过供应商联系方式,仔细商讨:商品明细、数量、单价、执行标准、交货方式、交货期、验收方式、合同条款等细节关键题确认,各种交易细节无误后要求供应商进行最终报价;',
|
||||
'3、您承诺对此次交易的内容用途已经完全了解并知悉经过严格仔细审核后实施,此次交易为合法经营,如违反相关法律规定,您将承担全部责任,与平台无关。您确认以上描述无误后请点击"选择"。'
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handTab(index) {
|
||||
this.menuIndex = index
|
||||
this.handleCurrentChange(1)
|
||||
},
|
||||
handTp(index) {
|
||||
this.tpIndex = index
|
||||
},
|
||||
handCalendarConfirm(e) {
|
||||
this.calendarValue = e[0]
|
||||
this.isCalendar = false
|
||||
},
|
||||
handCreate() {
|
||||
vk.navigateTo('/pages/public/create')
|
||||
},
|
||||
menuSelect(e) {
|
||||
this.menuIndex = parseInt(e)
|
||||
this.formData.status = parseInt(e)
|
||||
this.handleCurrentChange(1)
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
if (this.menuIndex === 1) this.getEnquiryList(page)
|
||||
else if (this.menuIndex === 0) this.getProcessList(page)
|
||||
else if (this.menuIndex === 2) this.getSelfSupportList(page)
|
||||
else if (this.menuIndex === 3) this.getOldList(page)
|
||||
},
|
||||
changeStatus(status) {
|
||||
this.activeName = status
|
||||
if (this.menuIndex === 1) this.getEnquiryList(1)
|
||||
else if (this.menuIndex === 0) this.getProcessList(1)
|
||||
else if (this.menuIndex === 2) this.getSelfSupportList(1)
|
||||
else if (this.menuIndex === 3) this.getOldList(1)
|
||||
},
|
||||
getEnquiryList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
userId: this.userInfo._id,
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
status: this.activeName
|
||||
},
|
||||
success: (res) => {
|
||||
this.enquiryList = res.rows.map(val => {
|
||||
let str = ''
|
||||
val.productNum = ''
|
||||
// if (val.productList !== undefined && val.productList.length > 0 && val.productList[0].addressRegion !== undefined && val.productList[0].addressRegion.length > 0) {
|
||||
// let provinceIndex = 0, cityIndex = 0, areaIndex = 0
|
||||
// this.provinceData.forEach((item, index) => {
|
||||
// if (parseInt(val.productList[0].addressRegion[0]) === parseInt(item.code)) {
|
||||
// provinceIndex = index
|
||||
// str = item.name
|
||||
// }
|
||||
// })
|
||||
// this.cityData[provinceIndex].forEach((item, index) => {
|
||||
// if (parseInt(val.productList[0].addressRegion[1]) === parseInt(item.code)) {
|
||||
// cityIndex = index
|
||||
// str += `-${item.name}`
|
||||
// }
|
||||
// })
|
||||
// this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
|
||||
// if (parseInt(val.productList[0].addressRegion[2]) === parseInt(item.code)) {
|
||||
// areaIndex = index
|
||||
// str += `-${item.name}`
|
||||
// }
|
||||
// })
|
||||
// // str += val.productList[0].addressDetail
|
||||
// }
|
||||
const productNumList = []
|
||||
val.productList.forEach((item, index) => {
|
||||
if (item.procureNumber) productNumList.push(item.procureNumber + item.procureUnit)
|
||||
})
|
||||
val.productNum = productNumList.join('/')
|
||||
val.fullAddress = val.addressRegion.province.name + '-' + val.addressRegion.city.name + '-' + val.addressRegion.area.name + '-' + val.addressDetail
|
||||
return val
|
||||
})
|
||||
this.total = res.total
|
||||
this.allNum = res.all
|
||||
this.notPickNum = res.notPickNum
|
||||
this.noQuoteNum = res.noQuoteNum
|
||||
this.pickedNum = res.pickedNum
|
||||
this.quoteNum = res.quoteNum
|
||||
}
|
||||
})
|
||||
},
|
||||
getProcessList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
isUser: true,
|
||||
userId: this.userInfo._id,
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
status: this.activeName
|
||||
},
|
||||
success: (res) => {
|
||||
this.processList = res.rows
|
||||
this.total = res.total
|
||||
this.allNum = res.all
|
||||
this.notPickNum = res.notPickNum
|
||||
this.pickedNum = res.pickedNum
|
||||
this.quoteNum = res.quoteNum
|
||||
this.noQuoteNum = res.noQuoteNum
|
||||
}
|
||||
})
|
||||
},
|
||||
async getSelfSupportList(pageIndex = 1) {
|
||||
this.selfSupportList = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
}
|
||||
})
|
||||
this.showList = true
|
||||
},
|
||||
showEnquiryModal(item) {
|
||||
this.$refs.enquiryModal.open(item)
|
||||
},
|
||||
showProcessModal(item) {
|
||||
this.$refs.processModal.open(item)
|
||||
},
|
||||
openCooperationDialog(type, item) {
|
||||
this.cooperationDialogType = type
|
||||
this.cooperationDialogItem = item
|
||||
this.isCooperationTip = true
|
||||
},
|
||||
closeCooperationDialog() {
|
||||
this.isCooperationTip = false
|
||||
this.cooperationDialogType = ''
|
||||
this.cooperationDialogItem = null
|
||||
},
|
||||
confirmCooperationDialog() {
|
||||
const type = this.cooperationDialogType
|
||||
const item = this.cooperationDialogItem
|
||||
this.closeCooperationDialog()
|
||||
if (type === 'process') this.showProcessModal(item)
|
||||
else this.showEnquiryModal(item)
|
||||
},
|
||||
editEnquiry(id) {
|
||||
vk.navigateTo(`/pages/enquiry/release?id=${id}`)
|
||||
},
|
||||
enquiryChangeToOnlineSign(id, index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `确认将该订单转为线上签订吗?`,
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: ' client/enquiry/sheet/kh/changeToOnlineSign',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
id
|
||||
}
|
||||
})
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `切换成功,是否去创建合同?`,
|
||||
success: res => {
|
||||
if (res.confirm) vk.navigateTo({url: '/pages/public/contract'});
|
||||
}
|
||||
})
|
||||
this.enquiryList[index].signMethod = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
processChangeToOnlineSign(id, index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `确认将该订单转为线上签订吗?`,
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/process/sheet/kh/changeToOnlineSign',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
id
|
||||
}
|
||||
})
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `切换成功,是否去创建合同?`,
|
||||
success: res => {
|
||||
if (res.confirm) vk.navigateTo({url: '/pages/public/contract'});
|
||||
}
|
||||
})
|
||||
this.processList[index].signMethod = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
showOtherUser(item) {
|
||||
const mine = this.userInfo._id === item.uid ? item.user : item.otherUser
|
||||
const otherUser = this.userInfo._id === item.uid ? item.otherUser : item.user
|
||||
const mineName = mine.accountType === 2 ? mine.company.companyName : mine.person.personName
|
||||
const otherName = otherUser.accountType === 2 ? otherUser.company.companyName : otherUser.person.personName
|
||||
this.$refs.contactModal.open(otherUser.businessCard.companyMobile, mine.businessCard.companyMobile, otherName, mineName)
|
||||
},
|
||||
showDetail(info) {
|
||||
this.$refs.selfSupportModal.open(info)
|
||||
},
|
||||
getOldList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/old/kh/getList',
|
||||
data: {
|
||||
quoteUid: this.userInfo._id,
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
buyerOnly: true,
|
||||
// signMethod: 'all',
|
||||
signMethod: this.oldSignMethod === 'all' ? null : this.oldSignMethod
|
||||
},
|
||||
success: (res) => {
|
||||
this.oldList = res.rows.map(item => {
|
||||
if (item.type === 0) item.typeStr = '拍卖'
|
||||
else if (item.type === 1) item.typeStr = '采购'
|
||||
else if (item.type === 2) item.typeStr = '租赁'
|
||||
else if (item.type === 3) item.typeStr = '物资回收'
|
||||
if (item.addressRegion && item.addressRegion.length > 0)
|
||||
item.address = item?.addressRegion[0]?.name + item?.addressRegion[1]?.name + item?.addressRegion[2]?.name + item.addressDetail
|
||||
return item
|
||||
})
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
||||
if (options.menuIndex) {
|
||||
this.menuIndex = parseInt(options.menuIndex)
|
||||
}
|
||||
if (this.menuIndex === 1) this.getEnquiryList()
|
||||
else if (this.menuIndex === 0) this.getProcessList()
|
||||
else if (this.menuIndex === 2) this.getSelfSupportList()
|
||||
else if (this.menuIndex === 3) this.getOldList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-tab {
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #f1f1f1;
|
||||
|
||||
.tab {
|
||||
margin: 0 20rpx;
|
||||
padding: 10rpx 0rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: relative;
|
||||
color: #A92924;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layout-total {
|
||||
padding: 0rpx 30rpx 20rpx;
|
||||
|
||||
.tp-box {
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.tp {
|
||||
position: relative;
|
||||
margin-right: 30rpx;
|
||||
padding: 20rpx 10rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
border-bottom: 1px solid #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-list {
|
||||
margin: 20rpx 20rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 30rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
|
||||
&:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.ing {
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
padding-left: 10rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 40rpx;
|
||||
color: #ffffff;
|
||||
background: url('~@/static/img/ing.png') center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.ed {
|
||||
font-size: 28rpx;
|
||||
line-height: 44rpx;
|
||||
color: #4f4f4f;
|
||||
}
|
||||
|
||||
.bao {
|
||||
// transform: scale(.8);
|
||||
padding: 2rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.bao-2 {
|
||||
color: #ffffff;
|
||||
border-color: #E99D42;
|
||||
background: #E99D42;
|
||||
}
|
||||
|
||||
.zhang {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 60%;
|
||||
z-index: 90;
|
||||
margin-top: -60rpx;
|
||||
width: 80rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.op-btn {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 40rpx;
|
||||
z-index: 90;
|
||||
width: 140rpx;
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
border: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
.btnred {
|
||||
color: #ffffff;
|
||||
border-color: #A92924;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.btnredplain {
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
|
||||
.btngreen {
|
||||
color: #ffffff;
|
||||
border-color: #81B337;
|
||||
background: #81B337;
|
||||
}
|
||||
|
||||
.btngreenplain {
|
||||
color: #81B337;
|
||||
border-color: #81B337;
|
||||
}
|
||||
|
||||
.btn-2 {
|
||||
top: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cooperation-tip-content {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.cooperation-tip-item {
|
||||
padding-bottom: 12rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
询价单管理
|
||||
</view>
|
||||
</view>
|
||||
<text class="text-gray text-25 pointer">查看全部 <i class="el-icon-arrow-right"></i></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-center items-center">
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.noQuote }}</text>
|
||||
<text>待报价</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.notPick }}</text>
|
||||
<text>待选商</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.picked }}</text>
|
||||
<text>已选商</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.closed }}</text>
|
||||
<text>已关闭</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "enquiryData",
|
||||
data() {
|
||||
return {
|
||||
enquiry: {
|
||||
noQuote: 0,
|
||||
notPick: 0,
|
||||
picked: 0,
|
||||
closed: 0
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/static/style/common.scss";
|
||||
|
||||
.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: $u-primary;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid $u-primary;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="100%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的报价</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList" :key="index">
|
||||
<text class="mt-10">供应商: {{ item.subjectName }}</text>
|
||||
<text class="mt-10">联系方式: {{ item.subjectMobile }}</text>
|
||||
<text class="mt-10">货款总价: {{ item.totalPrice }}元</text>
|
||||
<text class="mt-10">报价单详情: {{ item.remark }}</text>
|
||||
<text class="mt-10">供应商合同补充条款: {{ item.supplierExt }}</text>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mt-10">附件: </text>
|
||||
<text class="mt-10" v-if="item.files && item.files.length > 0">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="openDownload(file)"/>
|
||||
</text>
|
||||
</view>
|
||||
<text class="mt-10">报价时间: {{ item._add_time_str }}</text>
|
||||
<text class="mt-10">
|
||||
<u-button type="primary" size="mini" v-if="item.status === 0" @click.native="confirm(item)">选择
|
||||
</u-button>
|
||||
</text>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "enquiryModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
info: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.quoteList = info.quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toRelease() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
},
|
||||
confirm(item) {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId: item._id,
|
||||
},
|
||||
success: (data) => {
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '报价确认成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/public/contract?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/user/buyer')
|
||||
else vk.navigateTo('/pages/public/contract?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
});
|
||||
},
|
||||
openDownload(url) {
|
||||
window.location.href = url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.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: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
padding: 15px;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="100%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的报价列表</text>
|
||||
</view>
|
||||
<view class="py-20 border-bottom text-25" v-for="(item, index) in quoteList" :key="index">
|
||||
<view class="flex justify-start items-center mb-20">
|
||||
<text class="mr-10">报价方:</text>
|
||||
<text>{{ item.subjectName }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mb-20">
|
||||
<text class="mr-10">报价时间:</text>
|
||||
<text>{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mb-20">
|
||||
<text class="mr-10">联系方式:</text>
|
||||
<text>{{ item.user.mobile }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mb-20">
|
||||
<text class="mr-10">报价:</text>
|
||||
<text>{{ item.totalPrice }}元</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mb-20">
|
||||
<text class="mr-10">详情:</text>
|
||||
<text>{{ item.remark }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mb-20">
|
||||
<text class="mr-10">附件:</text>
|
||||
<template v-if="item.files.length > 0">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="openDownload(file)"/>
|
||||
</template>
|
||||
<text v-else>无</text>
|
||||
</view>
|
||||
<u-button v-if="status === 0 && type !== 3"
|
||||
size="mini" type="error" text="选择" style="width: 60rpx;"
|
||||
@click="confirmQuote(item._id)"
|
||||
></u-button>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
import {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
|
||||
|
||||
export default {
|
||||
name: "oldModal",
|
||||
components: {FilePdfOne, FileExcel, FileWord},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0,
|
||||
infoColumns: [
|
||||
{key: "company.companyName", title: "申请人", type: "text"},
|
||||
{key: "company.mobile", title: "联系方式", type: "text"},
|
||||
{key: "manager.personName", title: "代理人", type: "text"},
|
||||
{key: "manager.mobile", title: "代理人联系方式", type: "text"},
|
||||
],
|
||||
info: null,
|
||||
showInfo: false,
|
||||
signMethod: 0,
|
||||
type: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(id, status, quoteList, signMethod, type) {
|
||||
this.id = id
|
||||
this.status = status
|
||||
this.quoteList = quoteList
|
||||
this.signMethod = signMethod
|
||||
this.type = type
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
async confirmQuote(quoteId) {
|
||||
await vk.callFunction({
|
||||
url: 'client/old/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId,
|
||||
}
|
||||
});
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: "选择成功",
|
||||
type: 'success'
|
||||
})
|
||||
if (this.signMethod === 0) vk.navigateTo('/pages/public/contract?tab=1')
|
||||
else {
|
||||
if (this.signMethod === 1) vk.navigateTo('/pages/user/seller?menuIndex=2')
|
||||
else vk.navigateTo('/pages/public/contract')
|
||||
}
|
||||
},
|
||||
openDownload(url) {
|
||||
// window.open(url)
|
||||
window.location.href = url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.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>
|
||||
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="100%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
</view>
|
||||
<view v-for="(item, index) in quoteList.rows" :key="index" class="border-bottom py-20 ">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">加工商:</text>
|
||||
<text v-if="item.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">报价:</text>
|
||||
<text>{{ item.totalPrice }}元</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">加工方补充条款:</text>
|
||||
<text>{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">附件:</text>
|
||||
<template v-if="item.files && item.files.length">
|
||||
<file-type :item="file" v-for="(file, fileIndex) in item.files" :key="fileIndex"
|
||||
@click.native="openDownload(file)"/>
|
||||
</template>
|
||||
<text v-else>无</text>
|
||||
</view>
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <text class="mr-10">报价详情:</text>-->
|
||||
<!-- <text>{{ item.remark ? item.remark : '无' }}</text>-->
|
||||
<!-- </view>-->
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">申请时间:</text>
|
||||
<text>{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mt-25">
|
||||
<u-button
|
||||
size="mini"
|
||||
type="error"
|
||||
text="选择"
|
||||
style="width: 40rpx;"
|
||||
@click.native="createContract(item)" v-if="info.status === 0"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "processModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.id = info._id
|
||||
this.quoteList = info.quoteList
|
||||
console.log(this.quoteList.rows)
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getStorageSync('uni_id_user_info')._id,
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/public/contract?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/user/buyer')
|
||||
else vk.navigateTo('/pages/public/contract?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
openDownload(url) {
|
||||
window.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.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>
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="自营询价详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="100%"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-descriptions border size="small" :column="1">
|
||||
<el-descriptions-item label="询价区域">
|
||||
<span>{{ info.province.name }}{{ info.city.name }} </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span>{{ info.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<span>{{ info.phone }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业名称">
|
||||
<span>{{ info.company }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="询价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="openDownload(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
<template v-if="info.quoteList && info.status === 1">
|
||||
<el-descriptions-item label="报价列表">
|
||||
<div class="py-20 border-bottom" v-for="(item, index) in info.quoteList" :key="index">
|
||||
<p>公司:{{ item.user.company.companyName }}</p>
|
||||
<template v-if="item.amount">
|
||||
<p>报价:¥{{ item.amount }}</p>
|
||||
<span v-if="item.remark">备注:{{ item.remark }}</span>
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in item.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="openDownload(file)"/>
|
||||
</view>
|
||||
</template>
|
||||
<p v-else>未报价</p>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="info.quote">
|
||||
<el-descriptions-item label="报价">
|
||||
<span>¥{{ info.quote.amount }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<span>{{ info.quote.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.quote.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="openDownload(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "selfSupportModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0,
|
||||
quote: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
openDownload(url) {
|
||||
window.location.href = url
|
||||
// window.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.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>
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="自营询价详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-descriptions border size="small" :column="2">
|
||||
<el-descriptions-item label="询价区域">
|
||||
<span>{{ info.sheet.province.name }}{{ info.sheet.city.name }} </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span>{{ info.sheet.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<span>{{ info.sheet.phone }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业名称">
|
||||
<span>{{ info.sheet.company }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="询价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="openDownload(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价">
|
||||
<span>¥{{ info.amount }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<span>{{ info.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="openDownload(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "selfSupportQuoteModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
console.log(this.info)
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
openDownload(url) {
|
||||
// window.open(url)
|
||||
window.location.href = url
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.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>
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<view>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="100%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的申请合作列表</text>
|
||||
</view>
|
||||
<view v-if="cooperateList">
|
||||
<view v-for="(item, index) in cooperateList" :key="index" class="p-20 border-bottom">
|
||||
<view class="flex flex-col justify-start items-start" v-for="(item, index) in cooperateList" :key="index">
|
||||
<text class="flex-1 mb-10" v-if="item.user.accountType === 2">公司名称: {{ item.user.company.companyName }}</text>
|
||||
<text class="flex-1 mb-10">联系人: {{ item.name }}</text>
|
||||
<text class="flex-1 mb-10">联系方式: {{ item.mobile }}</text>
|
||||
<text class="flex-1 mb-10">备注: {{ item.remark }}</text>
|
||||
<view class="flex-1 mb-10">附件:
|
||||
<a v-for="(file, fileIndex) in item.files" :key="fileIndex" :href="file" target="_blank">预览:文件{{
|
||||
fileIndex + 1
|
||||
}}</a>
|
||||
</view>
|
||||
<text class="flex-1">申请时间: {{ item._add_time_str }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
<vk-data-dialog
|
||||
v-model="showInfo"
|
||||
title="申请详情"
|
||||
width="600px"
|
||||
top="14vh"
|
||||
center
|
||||
:close-on-click-modal="true"
|
||||
>
|
||||
<vk-data-detail-table
|
||||
:data="info"
|
||||
:columns="infoColumns"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
></vk-data-detail-table>
|
||||
<template v-slot:footer>
|
||||
<el-button @click="showInfo = false">关闭</el-button>
|
||||
</template>
|
||||
</vk-data-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
|
||||
export default {
|
||||
name: "spotModal",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
cooperateList: [],
|
||||
status: 0,
|
||||
infoColumns: [
|
||||
{key: "company.companyName", title: "申请人", type: "text"},
|
||||
{key: "company.mobile", title: "联系方式", type: "text"},
|
||||
{key: "manager.personName", title: "代理人", type: "text"},
|
||||
{key: "manager.mobile", title: "代理人联系方式", type: "text"},
|
||||
],
|
||||
info: null,
|
||||
showInfo: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(status, cooperateList) {
|
||||
this.cooperateList = cooperateList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
},
|
||||
doShowInfo(info) {
|
||||
this.info = info
|
||||
this.showInfo = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.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>
|
||||
@@ -0,0 +1,395 @@
|
||||
<template>
|
||||
<view>
|
||||
<uititle title="升级会员"></uititle>
|
||||
<el-card>
|
||||
<view class="grade-list">
|
||||
<view class="item pointer" v-for="(item,index) in gradeList" :key="index"
|
||||
:class="[parseInt(gradeIndex) === index ? 'active' : '', item.disabled ? 'disabled' : '']"
|
||||
@click="onChange(index)">
|
||||
<view class="flex justify-between items-center p-20">
|
||||
<view class="title">{{ item.name }}</view>
|
||||
<view class="flex flex-col justify-center items-end text-25" style="margin-right: 50rpx">
|
||||
<p>{{ item.amount }}元/年</p>
|
||||
<p class="mt-20" v-if="parseFloat(item.ensureAmount) > 0">+交易保证金({{ item.ensureAmount }}元)</p>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select">
|
||||
<view class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item pointer" @click="onChange(-2)"
|
||||
:class="[parseInt(gradeIndex) === -2 ? 'active' : '']">
|
||||
<view class="flex justify-between items-center p-20">
|
||||
<view class="title">交易保证金缴纳</view>
|
||||
<view class="flex flex-col justify-center items-end text-25" style="margin-right: 50rpx">
|
||||
<el-select v-model="ensureAmount" size="small">
|
||||
<el-option
|
||||
v-for="item in ensureList"
|
||||
:key="item.amount"
|
||||
:label="`${item.amount.toFixed(2)}元`"
|
||||
:value="item.amount">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select">
|
||||
<view class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<div class="flex justify-start items-center mt-20" v-if="gradeIndex === 2">
|
||||
<div @click="ensureIndex = 0"
|
||||
:style="{backgroundColor: ensureIndex === 0 ? '#a92924' : '', color: ensureIndex === 0 ? 'white' : ''}"
|
||||
class="border rounded p-20">50000元保证金
|
||||
</div>
|
||||
<div @click="ensureIndex = 1"
|
||||
:style="{backgroundColor: ensureIndex === 1 ? '#a92924' : '', color: ensureIndex === 1 ? 'white' : ''}"
|
||||
class="border rounded p-20 mx-20">100000元保证金
|
||||
</div>
|
||||
<div @click="ensureIndex = 2"
|
||||
:style="{backgroundColor: ensureIndex === 2 ? '#a92924' : '', color: ensureIndex === 2 ? 'white' : ''}"
|
||||
class="border rounded p-20">200000元保证金
|
||||
</div>
|
||||
</div>
|
||||
<view class="mt-20">
|
||||
<u-button type="primary" size="mini" v-if="gradeIndex > -1" @click="show = true">权益详情</u-button>
|
||||
</view>
|
||||
<view class="bzj-readme">
|
||||
<view class="sub-title">保证金协议</view>
|
||||
<u-parse :content="desc"></u-parse>
|
||||
</view>
|
||||
<view class="payment">
|
||||
<view class="sub-title">支付方式</view>
|
||||
<view class="content">
|
||||
<!-- <el-radio-group v-model="paymentIndex" class="ml-4">-->
|
||||
<!-- <el-radio v-for="(item,index) in payment" :key="index" :label="index"-->
|
||||
<!-- size="large">{{ item }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<view class="flex justify-start items-center">
|
||||
<image src="@/static/img/unionpay.png" style="width: 70rpx; height: 30rpx" mode="widthFix"></image>
|
||||
<text class="ml-15 text-28 text-main">银联支付</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pay-price">
|
||||
<view class="sub-title">支付金额:¥{{ amount }}元</view>
|
||||
</view>
|
||||
<view class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<view class="pay-desc">请打开手机微信,扫一扫完成支付</view>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</view>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
<u-popup :show="show" mode="bottom" round="15" closeable @close="show = false">
|
||||
<view class="p-50 text-25" v-if="gradeIndex > -1">
|
||||
<view class="flex justify-start items-center border-bottom py-15">
|
||||
<u-icon :name="gradeList[gradeIndex].icon[0]" size="100rpx" :label="gradeList[gradeIndex].name"/>
|
||||
</view>
|
||||
<view class="p-15 flex justify-between items-center">
|
||||
<text>获得身份方式</text>
|
||||
<text>
|
||||
购买{{ gradeList[gradeIndex].amount }}元/年{{
|
||||
`${gradeList[gradeIndex].ensureAmount > 0 ? `+交易保证金(${gradeList[gradeIndex].ensureAmount})` : ``}`
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="p-15 flex justify-between items-center">
|
||||
<text>升级方式</text>
|
||||
<text>交易额每{{ parseFloat(gradeList[gradeIndex].upgradeAmount) / 10000 }}万升一级,共十级</text>
|
||||
</view>
|
||||
<view class="p-15 flex justify-between items-center">
|
||||
<text>询报价权益</text>
|
||||
<text>{{
|
||||
parseInt(gradeList[gradeIndex].offerOffRate) === 0 ? '不限次数,免费' :
|
||||
(parseInt(gradeList[gradeIndex].offerOffRate) === 100 ? '-' : `${parseInt(gradeList[gradeIndex].offerOffRate) / 10}折`)
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="p-15 flex justify-between items-center">
|
||||
<text>增值服务</text>
|
||||
<text>
|
||||
{{
|
||||
(parseInt(gradeList[gradeIndex].valueAddRate) === 100 ? '-' : `${parseInt(gradeList[gradeIndex].valueAddRate) / 10}折`)
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="p-15 flex justify-between items-center">
|
||||
<text>加工厂店铺</text>
|
||||
<text>可授权</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import uititle from "@/components/common/title.vue";
|
||||
|
||||
const OpenSdk = require('@/lib/base').default;
|
||||
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
})
|
||||
export default {
|
||||
components: {uititle},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
showQrcode: false,
|
||||
billQRCode: '',
|
||||
gradeIndex: null,
|
||||
gradeList: [],
|
||||
desc: '',
|
||||
ensureList: [],
|
||||
ensureAmount: null,
|
||||
ensureIndex: 0,
|
||||
show: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDesc()
|
||||
this.getEnsureConfig()
|
||||
this.getUserLevelList()
|
||||
},
|
||||
methods: {
|
||||
async getDesc() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '880c33886636217300376edd5a56e1e6'
|
||||
},
|
||||
})
|
||||
this.desc = res.content
|
||||
},
|
||||
async getEnsureConfig() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/ensureConfig/pub/getList',
|
||||
})
|
||||
this.ensureList = rows
|
||||
this.ensureAmount = this.ensureList[0].amount
|
||||
},
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.gradeList.map(item => {
|
||||
item.disabled = false
|
||||
if (data.userInfo.userLevel && parseInt(data.userInfo.userLevel) > -1) {
|
||||
item.disabled = parseInt(item.level) < parseInt(data.userInfo.userLevel)
|
||||
}
|
||||
return item
|
||||
})
|
||||
for (let i in this.gradeList) {
|
||||
if (!this.gradeList[i].disabled) {
|
||||
this.gradeIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onChange(index) {
|
||||
if (index === -2) this.gradeIndex = index
|
||||
else {
|
||||
if (this.gradeList[index].disabled) return
|
||||
this.gradeIndex = index
|
||||
}
|
||||
},
|
||||
async onPay() {
|
||||
let res
|
||||
if (this.gradeIndex === -2) {
|
||||
res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goods: {
|
||||
name: `交易保证金-${this.ensureAmount}元`,
|
||||
amount: this.ensureAmount,
|
||||
cover: null
|
||||
},
|
||||
type: 2,
|
||||
goodsId: null,
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goods: {
|
||||
name: `会员升级-${this.gradeList[this.gradeIndex].name}`,
|
||||
amount: this.amount,
|
||||
cover: null
|
||||
},
|
||||
type: 3,
|
||||
goodsId: parseInt(this.gradeList[this.gradeIndex].level),
|
||||
ensureIndex: this.ensureIndex,
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
}
|
||||
vk.redirectTo({url: `/pages/shop/pay?id=${res.data}`})
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
success: (data) => {
|
||||
this.gradeList = data.rows.filter(item => parseFloat(item.amount) > 0)
|
||||
this.getUserInfo()
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
if (this.gradeIndex === -2) return this.ensureAmount
|
||||
else if (this.gradeIndex === 2) return parseFloat(this.gradeList[this.gradeIndex].amount) + [50000, 100000, 200000][this.ensureIndex]
|
||||
else return parseFloat(this.gradeList[this.gradeIndex].amount) + parseFloat(this.gradeList[this.gradeIndex].ensureAmount)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.clearfix {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.grade-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
|
||||
.item-box {
|
||||
display: flex;
|
||||
|
||||
.title {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 230px;
|
||||
|
||||
.price {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
|
||||
.item-box {
|
||||
.title {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.info {
|
||||
.price {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.bzj-readme {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.payment {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
cursor: not-allowed;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,819 @@
|
||||
<template> <!-- 卖家中心 -->
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<!-- 顶部 -->
|
||||
<uititle title="卖家中心"></uititle>
|
||||
<!-- 选项卡 -->
|
||||
<view class="layout layout-tab flex justify-between align-center">
|
||||
<view :class="['tab', {active: menuIndex === 1}]" @click="handTab(1)">询价单</view>
|
||||
<view :class="['tab', {active: menuIndex === 0}]" @click="handTab(0)">现货</view>
|
||||
<view :class="['tab', {active: menuIndex === 4}]" @click="handTab(4)">加工</view>
|
||||
<view :class="['tab', {active: menuIndex === 2}]" @click="handTab(2)">旧货</view>
|
||||
<view :class="['tab', {active: menuIndex === 3}]" @click="handTab(3)">自营询价
|
||||
</view>
|
||||
<view :class="['tab', {active: menuIndex === 5}]" @click="handTab(5)">金久信公正银联资料</view>
|
||||
</view>
|
||||
<!-- 统计数量和操作按钮 -->
|
||||
<!-- <view class="layout layout-total bg-white">-->
|
||||
<!-- <view class="search-box flex justify-between m-top-30">-->
|
||||
<!-- <view class="date" @click="isCalendar = true">-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="日期"-->
|
||||
<!-- v-model="calendarValue"-->
|
||||
<!-- suffixIcon="calendar"-->
|
||||
<!-- prefixIconStyle="font-size: 32px;color: #909399"-->
|
||||
<!-- :customStyle="inputClass"-->
|
||||
<!-- :disabled="true"-->
|
||||
<!-- disabledColor="#fff"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="width: 30rpx;"></view>-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="搜索编号或品名"-->
|
||||
<!-- suffixIcon="search"-->
|
||||
<!-- prefixIconStyle="font-size: 32px;color: #909399"-->
|
||||
<!-- :customStyle="inputClass"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</u-sticky>
|
||||
<!-- 列表 -->
|
||||
<view class="layout layout-list">
|
||||
<template v-if="menuIndex === 0">
|
||||
<view class="item" v-for="(item, index) in spotList" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{ item.status === 0 ? '发布中' : '已选商' }}</view>
|
||||
<view class="ed m-left-10">{{ item.name }}</view>
|
||||
</view>
|
||||
<view class="text red m-top-10">
|
||||
约{{ item.stock }}吨 | {{
|
||||
item.address.province.name + "-" + item.address.city.name + "-" + item.address.area.name
|
||||
}}
|
||||
|
||||
</view>
|
||||
<view class="text date m-top-10">
|
||||
<text>{{ item._add_time_str }}更新</text>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="op-btn btn-1 btnred">收到{{ item.quoteNum }}个报价</view>
|
||||
<view class="flex justify-end items-center">
|
||||
<view class="mr-10">
|
||||
<u-button size="mini" plain type="error"
|
||||
@click.native="$jump(`/pages/goods/detail?id=${item._id}`)">
|
||||
查看详情
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-10" v-if="item.status !== 0 && item.signMethod !== 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract')">去创建合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-10" v-if="item.status === 0">
|
||||
<u-button size="mini" type="error"
|
||||
@click.native="showSpotModal(item)"
|
||||
>查看意向合作列表
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-10" v-else>
|
||||
<u-button size="mini" type="success" plain
|
||||
>查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="!spotList.length"></u-empty>
|
||||
|
||||
</template>
|
||||
<template v-if="menuIndex === 1">
|
||||
<view class="item" v-for="(item, index) in enquiryList" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{ item.status === 0 ? '发布中' : '已选商' }}</view>
|
||||
<view class="ed m-left-10">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="text-main text-25 p-10">{{ item.signMethod === 1 ? '线下签单' : '线上签约' }}</view>
|
||||
<view class="flex justify-start m-top-10" v-if="item.status === 1 && item.signMethod === 1">
|
||||
<view class="bao bao-2 m-left-10" @click="enquiryChangeToOnlineSign(item._id, index)">
|
||||
切换线上交易
|
||||
</view>
|
||||
</view>
|
||||
<view class="text red m-top-10">
|
||||
{{ item.productNum }} | {{ item.fullAddress }}
|
||||
</view>
|
||||
<view class="text date m-top-10">
|
||||
<text class="m-right-20">交易编码:{{ item.enquiryNo }}</text>
|
||||
<text>{{ item._add_time_str }}更新</text>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<!-- <view class="op-btn btn-2 btnredplain">编辑报价</view>-->
|
||||
<!-- 章 -->
|
||||
<view class="zhang">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 0"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-else></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center mt-10">
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=1')">
|
||||
签署合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=2')">
|
||||
查看合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mx-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=0')">
|
||||
合同待创建
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15" v-if="item.status === 2">
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="$jump('/pages/order/order')">去订单
|
||||
</u-button>
|
||||
</view>
|
||||
<view>
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="!enquiryList.length"></u-empty>
|
||||
</template>
|
||||
<template v-if="menuIndex === 2">
|
||||
<view class="item" v-for="(item, index) in oldList" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{ item.status === 0 ? '发布中' : '已选商' }}</view>
|
||||
<view class="ed m-left-10">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="text-main text-25 p-10">{{ item.signMethod === 1 ? '线下签单' : '线上签约' }}</view>
|
||||
<view class="flex justify-start m-top-10" v-if="item.status === 1 && item.signMethod === 1">
|
||||
<view class="bao bao-2 m-left-10" @click="oldChangeToOnlineSign(item._id, index)">切换线上交易
|
||||
</view>
|
||||
</view>
|
||||
<view class="text red m-top-10" v-if="item.type !== 1 && item.type !== 2">
|
||||
{{ item.typeStr }} | {{
|
||||
(item.addressRegion && item.addressRegion.province) ? `${item.addressRegion.province.name}${item.addressRegion.city.name}${item.addressRegion.area.name}${item.addressDetail}` : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="text red m-top-10" v-else>
|
||||
{{ item.typeStr }} | {{
|
||||
(item.deliverAddressRegion && item.deliverAddressRegion.province) ? `${item.deliverAddressRegion.province.name}${item.deliverAddressRegion.city.name}${item.deliverAddressRegion.area.name}${item.deliverAddressDetail}` : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="text date m-top-10 flex flex-col justify-start items-start">
|
||||
<text class="m-right-20">交易编码:{{ item._id }}</text>
|
||||
<text>{{ item._add_time_str }}发布</text>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="op-btn btn-1 btnred">收到{{ item.quoteNum }}个报价</view>
|
||||
<!-- <view class="op-btn btn-2 btnredplain">编辑报价</view>-->
|
||||
<!-- 章 -->
|
||||
<view class="zhang">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 0"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-else></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center">
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=1')">
|
||||
签署合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=2')">
|
||||
查看合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=0')">
|
||||
合同待创建
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15" v-if="item.status === 0">
|
||||
<u-button size="mini" type="primary"
|
||||
@click.native="showOldModal(item)"
|
||||
>查看意向合作列表
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15" v-else>
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="!oldList.length"></u-empty>
|
||||
</template>
|
||||
<template v-if="menuIndex === 3">
|
||||
<view class="item" v-for="(item, index) in selfSupportList.rows" :key="index">
|
||||
<view class="hava flex justify-start">
|
||||
<view class="ing">{{
|
||||
item.sheet.status === 0 ? '待报价' : (item.sheet.status === 1 ? '待选商' : '已选商')
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="font-bold m-top-10">询价地址</view>
|
||||
<view class="text red m-top-10">{{ item.sheet.province.name }}{{ item.sheet.city.name }}</view>
|
||||
<view class="text date m-top-10">
|
||||
<text>{{ item._add_time_str }}发布</text>
|
||||
</view>
|
||||
<!-- 章 -->
|
||||
<view class="zhang" style="top: 40%">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 0"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-else></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center">
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.contract && item.contract.status === 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=1')">
|
||||
签署合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && item.contract && item.contract.status === 2">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=2')">
|
||||
查看合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15"
|
||||
v-if="item.status !== 0 && (!item.contract || item.contract.status === 0)">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=0')">
|
||||
合同待创建
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15">
|
||||
<u-button size="mini" plain
|
||||
@click.native="showDetail(item)">查看详情
|
||||
</u-button>
|
||||
</view>
|
||||
|
||||
<view class="mr-15" v-if="item.sheet.status === 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="toSelfSupportQuote(item)">立即报价
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-15" v-if="item.sheet.status === 2">
|
||||
<u-button size="mini" type="success" plain
|
||||
@click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="!selfSupportList.length"></u-empty>
|
||||
</template>
|
||||
<template v-if="menuIndex === 4">
|
||||
<view class="item" v-for="(item, index) in processList" :key="index">
|
||||
<view class="hava flex justify-start items-center">
|
||||
<view class="ing">{{
|
||||
item.status === 0 ? '待报价' : (item.status === 1 ? '待选商' : '已选商')
|
||||
}}
|
||||
</view>
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
<view class="text-red my-10 text-25">{{ item.signMethod === 1 ? '线下签单' : '线上签约' }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<view class="font-bold m-top-10 mr-10">加工量:</view>
|
||||
<view class="text red m-top-10">{{ item.num }}</view>
|
||||
</view>
|
||||
<view class="text date m-top-10">
|
||||
<text class="mr-25">交易编号:{{ item.orderNo }}</text>
|
||||
<text>{{ item._add_time_str }}发布</text>
|
||||
</view>
|
||||
<!-- 章 -->
|
||||
<view class="zhang" style="top: 40%">
|
||||
<image class="full" src="/static/img/unchoose.png" mode="" v-if="item.status === 0"></image>
|
||||
<image class="full" src="/static/img/choose.png" mode="" v-else></image>
|
||||
</view>
|
||||
<view class="flex justify-end items-center">
|
||||
<view class="mr-10"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=1')">
|
||||
签署合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-10"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=2')">
|
||||
查看合同
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="mr-10"
|
||||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)">
|
||||
<u-button size="mini" type="success"
|
||||
@click.native="$jump('/pages/public/contract?tab=0')">
|
||||
合同待创建
|
||||
</u-button>
|
||||
</view>
|
||||
<view>
|
||||
<u-button size="mini" type="success" plain @click.native="showOtherUser(item)">查看交易方
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="!processList.length"></u-empty>
|
||||
</template>
|
||||
<template v-if="menuIndex === 5">
|
||||
<notary-union-pay :user-data="userInfo"></notary-union-pay>
|
||||
</template>
|
||||
</view>
|
||||
<!-- 没有数据 u-empty是框架组件 cmempty是自己封装组件 -->
|
||||
<!-- <u-empty mode="list" text="暂无更多内容~"></u-empty>-->
|
||||
<!-- <cmempty></cmempty> -->
|
||||
<!-- 日历 -->
|
||||
<u-calendar
|
||||
:show="isCalendar"
|
||||
mode="single"
|
||||
@confirm="handCalendarConfirm"
|
||||
@close="isCalendar = false"
|
||||
></u-calendar>
|
||||
<enquiry-modal ref="enquiryModal"/>
|
||||
<process-modal ref="processModal"/>
|
||||
<spot-modal ref="spotModal"/>
|
||||
<old-modal ref="oldModal"/>
|
||||
<self-support-quote-modal ref="selfSupportQuoteModal"/>
|
||||
<self-support-modal ref="selfSupportModal"/>
|
||||
<contact-modal ref="contactModal"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import cmsearch from '@/components/common/search'
|
||||
import cmempty from '@/components/common/empty'
|
||||
import OldModal from "@/pages/user/components/oldModal.vue";
|
||||
import EnquiryModal from "@/pages/user/components/enquiryModal.vue";
|
||||
import ProcessModal from "@/pages/user/components/processModal.vue";
|
||||
import SpotModal from "@/pages/user/components/spotModal.vue";
|
||||
import SelfSupportQuoteModal from "@/pages/user/components/selfSupportQuoteModal.vue";
|
||||
import SelfSupportModal from "@/pages/user/components/selfSupportModal.vue";
|
||||
import ContactModal from "@/components/ContactModal.vue";
|
||||
import NotaryUnionPay from "@/components/user/notary-union-pay.vue";
|
||||
|
||||
const d = new Date()
|
||||
const year = d.getFullYear()
|
||||
let month = d.getMonth() + 1
|
||||
month = month < 10 ? `0${month}` : month
|
||||
const date = d.getDate()
|
||||
export default {
|
||||
components: {
|
||||
NotaryUnionPay,
|
||||
ContactModal,
|
||||
SelfSupportModal,
|
||||
SelfSupportQuoteModal,
|
||||
SpotModal,
|
||||
ProcessModal,
|
||||
EnquiryModal,
|
||||
OldModal,
|
||||
uititle,
|
||||
cmsearch,
|
||||
cmempty,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultDate: '${year}-${month}-${date}',
|
||||
isCalendar: false,
|
||||
calendarValue: '',
|
||||
inputClass: {
|
||||
height: '20px',
|
||||
borderRadius: 0,
|
||||
},
|
||||
tpIndex: 0,
|
||||
activeName: 'all',
|
||||
menuIndex: 1,
|
||||
formData: {
|
||||
status: 0,
|
||||
tradeMethod: null
|
||||
},
|
||||
tableData: {},
|
||||
pageSize: 10,
|
||||
enquiryList: [],
|
||||
spotList: [],
|
||||
oldList: [],
|
||||
selfSupportList: [],
|
||||
total: 0,
|
||||
notPickNum: 0,
|
||||
pickedNum: 0,
|
||||
noQuoteNum: 0,
|
||||
allNum: 0,
|
||||
userInfo: null,
|
||||
processList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handTab(index) {
|
||||
this.menuIndex = index
|
||||
this.handleCurrentChange(1)
|
||||
},
|
||||
handTp(index) {
|
||||
this.tpIndex = index
|
||||
},
|
||||
handCalendarConfirm(e) {
|
||||
this.calendarValue = e[0]
|
||||
this.isCalendar = false
|
||||
},
|
||||
handCreate() {
|
||||
vk.navigateTo('/pages/public/create')
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
if (this.menuIndex === 1) this.getEnquiryList(page)
|
||||
else if (this.menuIndex === 0) this.getSpotList(page)
|
||||
else if (this.menuIndex === 2) this.getOldList(page)
|
||||
else if (this.menuIndex === 3) this.getSelfSupportList(page)
|
||||
else if (this.menuIndex === 4) this.getProcessList(page)
|
||||
else if (this.menuIndex === 5) return
|
||||
},
|
||||
getEnquiryList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
userId: this.userInfo._id,
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
status: this.activeName,
|
||||
isSeller: true
|
||||
},
|
||||
success: (res) => {
|
||||
this.enquiryList = res.rows.map(val => {
|
||||
let str = ''
|
||||
val.productNum = ''
|
||||
// if (val.productList !== undefined && val.productList.length > 0 && val.productList[0].addressRegion !== undefined && val.productList[0].addressRegion.length > 0) {
|
||||
// let provinceIndex = 0, cityIndex = 0, areaIndex = 0
|
||||
// this.provinceData.forEach((item, index) => {
|
||||
// if (parseInt(val.productList[0].addressRegion[0]) === parseInt(item.code)) {
|
||||
// provinceIndex = index
|
||||
// str = item.name
|
||||
// }
|
||||
// })
|
||||
// this.cityData[provinceIndex].forEach((item, index) => {
|
||||
// if (parseInt(val.productList[0].addressRegion[1]) === parseInt(item.code)) {
|
||||
// cityIndex = index
|
||||
// str += `-${item.name}`
|
||||
// }
|
||||
// })
|
||||
// this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
|
||||
// if (parseInt(val.productList[0].addressRegion[2]) === parseInt(item.code)) {
|
||||
// areaIndex = index
|
||||
// str += `-${item.name}`
|
||||
// }
|
||||
// })
|
||||
// // str += val.productList[0].addressDetail
|
||||
// }
|
||||
const productNumList = []
|
||||
val.productList.forEach((item, index) => {
|
||||
if (item.procureNumber) productNumList.push(item.procureNumber + item.procureUnit)
|
||||
})
|
||||
val.productNum = productNumList.join('/')
|
||||
val.fullAddress = val.addressRegion.province.name + '-' + val.addressRegion.city.name + '-' + val.addressRegion.area.name + '-' + val.addressDetail
|
||||
return val
|
||||
})
|
||||
this.total = res.total
|
||||
this.allNum = res.all
|
||||
this.notPickNum = res.notPickNum
|
||||
this.noQuoteNum = res.noQuoteNum
|
||||
this.pickedNum = res.pickedNum
|
||||
this.quoteNum = res.quoteNum
|
||||
}
|
||||
})
|
||||
},
|
||||
getSpotList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/kh/getSelfOne',
|
||||
data: {
|
||||
userId: this.userInfo._id,
|
||||
},
|
||||
success: (res) => {
|
||||
this.spotList = res.rows
|
||||
this.total = res.total
|
||||
this.allNum = res.all
|
||||
this.notPickNum = res.notPickNum
|
||||
this.pickedNum = res.pickedNum
|
||||
this.quoteNum = res.quoteNum
|
||||
}
|
||||
})
|
||||
},
|
||||
getOldList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/old/kh/getList',
|
||||
data: {
|
||||
userId: this.userInfo._id,
|
||||
pageIndex,
|
||||
pageSize: this.pageSize
|
||||
},
|
||||
success: (res) => {
|
||||
this.oldList = res.rows.map(item => {
|
||||
if (item.type === 0) item.typeStr = '拍卖'
|
||||
else if (item.type === 1) item.typeStr = '采购'
|
||||
else if (item.type === 2) item.typeStr = '租赁'
|
||||
else if (item.type === 3) item.typeStr = '物资回收'
|
||||
if (item.addressRegion && item.addressRegion.length > 0)
|
||||
item.address = item?.addressRegion[0]?.name + item?.addressRegion[1]?.name + item?.addressRegion[2]?.name + item.addressDetail
|
||||
return item
|
||||
})
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
getSelfSupportList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getQuoteList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize
|
||||
},
|
||||
success: (res) => {
|
||||
this.selfSupportList = res
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
getProcessList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
isUser: true,
|
||||
otherUid: this.userInfo._id,
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
status: this.activeName
|
||||
},
|
||||
success: (res) => {
|
||||
this.processList = res.rows
|
||||
}
|
||||
})
|
||||
},
|
||||
toSelfSupportQuote(item) {
|
||||
vk.navigateTo({url: `/pages/self/makeQuote?id=${item.quoteId}`})
|
||||
},
|
||||
showEnquiryModal({status, quoteList}) {
|
||||
this.$refs.enquiryModal.open(status, quoteList)
|
||||
},
|
||||
showSpotModal({status, cooperateList}) {
|
||||
this.$refs.spotModal.open(status, cooperateList)
|
||||
},
|
||||
showOldModal({_id, status, quoteList, signMethod, type}) {
|
||||
this.$refs.oldModal.open(_id, status, quoteList, signMethod, type)
|
||||
},
|
||||
editEnquiry(id) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/enquiry/release?id=${id}`
|
||||
})
|
||||
},
|
||||
enquiryChangeToOnlineSign(id, index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `确认将该订单转为线上签订吗?`,
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/changeToOnlineSign',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
id
|
||||
}
|
||||
})
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `切换成功,是否去创建合同?`,
|
||||
success: res => {
|
||||
if (res.confirm) vk.navigateTo({url: '/pages/public/contract'});
|
||||
}
|
||||
})
|
||||
this.enquiryList[index].signMethod = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
showOtherUser(item) {
|
||||
const mine = this.userInfo._id === item.uid ? item.user : item.otherUser
|
||||
const otherUser = this.userInfo._id === item.uid ? item.otherUser : item.user
|
||||
const mineName = mine.accountType === 2 ? mine.company.companyName : mine.person.personName
|
||||
const otherName = otherUser.accountType === 2 ? otherUser.company.companyName : otherUser.person.personName
|
||||
this.$refs.contactModal.open(otherUser.businessCard.companyMobile, mine.businessCard.companyMobile, otherName, mineName)
|
||||
},
|
||||
oldChangeToOnlineSign(id, index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `确认将该订单转为线上签订吗?`,
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/old/kh/changeToOnlineSign',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
id
|
||||
}
|
||||
})
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `切换成功,是否去创建合同?`,
|
||||
success: res => {
|
||||
if (res.confirm) vk.navigateTo({url: '/pages/public/contract'});
|
||||
}
|
||||
})
|
||||
this.enquiryList[index].signMethod = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(info) {
|
||||
info.sheet.quote = info
|
||||
this.$refs.selfSupportModal.open(info.sheet)
|
||||
},
|
||||
changeOldStatus() {
|
||||
this.getOldList(1)
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
||||
if (options.menuIndex) {
|
||||
this.menuIndex = parseInt(options.menuIndex)
|
||||
}
|
||||
this.handleCurrentChange(1)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-tab {
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #f1f1f1;
|
||||
|
||||
.tab {
|
||||
margin: 0 20rpx;
|
||||
padding: 10rpx 0rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: relative;
|
||||
color: #A92924;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layout-total {
|
||||
padding: 0rpx 30rpx 20rpx;
|
||||
|
||||
.tp-box {
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.tp {
|
||||
position: relative;
|
||||
margin-right: 30rpx;
|
||||
padding: 20rpx 10rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
border-bottom: 1px solid #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-list {
|
||||
margin: 20rpx 20rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 30rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
|
||||
&:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.ing {
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
padding-left: 10rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 40rpx;
|
||||
color: #ffffff;
|
||||
background: url('~@/static/img/ing.png') center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.ed {
|
||||
font-size: 28rpx;
|
||||
line-height: 44rpx;
|
||||
color: #4f4f4f;
|
||||
}
|
||||
|
||||
.bao {
|
||||
// transform: scale(.8);
|
||||
padding: 2rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.bao-2 {
|
||||
color: #ffffff;
|
||||
border-color: #E99D42;
|
||||
background: #E99D42;
|
||||
}
|
||||
|
||||
.zhang {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 60%;
|
||||
z-index: 90;
|
||||
margin-top: -60rpx;
|
||||
width: 80rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.op-btn {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 40rpx;
|
||||
z-index: 90;
|
||||
width: 140rpx;
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
border: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
.btnred {
|
||||
color: #ffffff;
|
||||
border-color: #A92924;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.btnredplain {
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
|
||||
.btngreen {
|
||||
color: #ffffff;
|
||||
border-color: #81B337;
|
||||
background: #81B337;
|
||||
}
|
||||
|
||||
.btngreenplain {
|
||||
color: #81B337;
|
||||
border-color: #81B337;
|
||||
}
|
||||
|
||||
.btn-2 {
|
||||
top: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle title="个人中心" :show-back="false"></uititle>
|
||||
<!-- 选项卡 -->
|
||||
<view class="layout layout-tab flex justify-start align-center">
|
||||
<view :class="['tab', {active: tabIndex === 0}]" @click="handTab(0)">实名认证</view>
|
||||
<view :class="['tab', {active: tabIndex === 1}]" @click="handTab(1)">我的名片</view>
|
||||
<view :class="['tab', {active: tabIndex === 8}]" @click="handTab(8)">业务联系人</view>
|
||||
<view :class="['tab', {active: tabIndex === 3}]" @click="handTab(3)">我的消息</view>
|
||||
<view :class="['tab', {active: tabIndex === 4}]" @click="handTab(4)">平台权益</view>
|
||||
<view :class="['tab', {active: tabIndex === 5}]" @click="handTab(5)">我的邀请</view>
|
||||
<view :class="['tab', {active: tabIndex === 6}]" @click="handTab(6)">我的加工厂</view>
|
||||
<view :class="['tab', {active: tabIndex === 7}]" @click="handTab(7)">收款账号</view>
|
||||
<view :class="['tab', {active: tabIndex === 9}]" @click="handTab(9)" v-if="userData.userLevel > 1">新闻动态</view>
|
||||
<view :class="['tab', {active: tabIndex === 2}]" @click="handTab(2)">修改密码</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<!-- 主要内容 -->
|
||||
<view class="layout layout-content">
|
||||
<template v-if="tabIndex === 0 && userData">
|
||||
<!-- 企业认证 -->
|
||||
<usident :user-data="userData"></usident>
|
||||
</template>
|
||||
<template v-if="tabIndex === 1 && userData">
|
||||
<!-- 我的名片 -->
|
||||
<uscard :user-data="userData"></uscard>
|
||||
</template>
|
||||
<template v-if="tabIndex === 2 && userData">
|
||||
<!-- 账户管理 -->
|
||||
<usaccount :user-data="userData"></usaccount>
|
||||
</template>
|
||||
<template v-if="tabIndex === 3 && userData">
|
||||
<!-- 我的消息 -->
|
||||
<usnotice></usnotice>
|
||||
</template>
|
||||
<template v-if="tabIndex === 4 && userData">
|
||||
<!-- 平台权益 -->
|
||||
<usequity :user-data="userData"></usequity>
|
||||
</template>
|
||||
<template v-if="tabIndex === 5 && userData">
|
||||
<!-- 我的邀请 -->
|
||||
<usinvite :user-data="userData"></usinvite>
|
||||
</template>
|
||||
<template v-if="tabIndex === 6 && userData">
|
||||
<!-- 我的加工厂 -->
|
||||
<factory :user-data="userData"></factory>
|
||||
</template>
|
||||
<template v-if="tabIndex === 7 && userData">
|
||||
<!-- 收款账号 -->
|
||||
<payee-account :user-data="userData"></payee-account>
|
||||
</template>
|
||||
<template v-if="tabIndex === 8 && userData">
|
||||
<!-- 业务联系人 -->
|
||||
<business-contact :user-data="userData"></business-contact>
|
||||
</template>
|
||||
<template v-if="tabIndex === 9 && userData">
|
||||
<!-- 业务联系人 -->
|
||||
<news :user-data="userData"></news>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import cmsearch from '@/components/common/search'
|
||||
import cmempty from '@/components/common/empty'
|
||||
import usnotice from '@/components/user/notice'
|
||||
import usaccount from '@/components/user/account'
|
||||
import uscard from '@/components/user/card'
|
||||
import usequity from '@/components/user/equity'
|
||||
import usinvite from '@/components/user/invite'
|
||||
import usident from '@/components/user/ident'
|
||||
import Factory from "@/components/user/factory.vue";
|
||||
import PayeeAccount from "@/components/user/payeeAccount.vue";
|
||||
import BusinessContact from "@/components/user/business-contact.vue";
|
||||
import News from "@/pages/user/components/news.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
News,
|
||||
BusinessContact,
|
||||
PayeeAccount,
|
||||
Factory,
|
||||
uititle,
|
||||
cmsearch,
|
||||
cmempty,
|
||||
usnotice,
|
||||
usaccount,
|
||||
uscard,
|
||||
usequity,
|
||||
usinvite,
|
||||
usident,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
userData: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handTab(index) {
|
||||
this.tabIndex = index
|
||||
},
|
||||
async getUserInfo(){
|
||||
const {userInfo} = await vk.userCenter.getCurrentUserInfo()
|
||||
this.userData = userInfo
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userData = vk.getStorageSync('uni_id_user_info')
|
||||
if (!this.userData) vk.navigateTo('/pages/login/login')
|
||||
this.getUserInfo()
|
||||
const userTab = uni.getStorageSync('user_tab')
|
||||
if (userTab) {
|
||||
this.tabIndex = parseInt(userTab)
|
||||
uni.removeStorageSync('user_tab')
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.layout-tab {
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #f1f1f1;
|
||||
overflow-x: scroll;
|
||||
|
||||
.tab {
|
||||
padding: 10rpx 0rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: relative;
|
||||
color: #A92924;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user