820 lines
29 KiB
Vue
820 lines
29 KiB
Vue
<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>
|