1146 lines
44 KiB
Vue
1146 lines
44 KiB
Vue
<template>
|
||
<view class="">
|
||
<top-bar></top-bar>
|
||
<common-nav></common-nav>
|
||
<view class="w-1200">
|
||
<el-row :gutter="20">
|
||
<el-col :span="6">
|
||
<el-menu @select="menuSelect" :default-active="menuIndex" class="el-menu-vertical-demo">
|
||
<el-menu-item index="1">
|
||
<i class="el-icon-warning-outline"></i>
|
||
<span slot="title">询价单管理</span>
|
||
</el-menu-item>
|
||
<el-menu-item index="0">
|
||
<i class="el-icon-edit"></i>
|
||
<span slot="title">现货</span>
|
||
</el-menu-item>
|
||
<el-menu-item index="4">
|
||
<i class="el-icon-edit"></i>
|
||
<span slot="title">加工单列表</span>
|
||
</el-menu-item>
|
||
<el-menu-item index="2">
|
||
<i class="el-icon-attract"></i>
|
||
<span slot="title">旧货</span>
|
||
</el-menu-item>
|
||
<el-menu-item index="3">
|
||
<i class="el-icon-s-order"></i>
|
||
<span slot="title">自营报价单列表</span>
|
||
</el-menu-item>
|
||
</el-menu>
|
||
</el-col>
|
||
<el-col :span="18">
|
||
<!-- <el-card shadow="never">-->
|
||
<!-- <el-tabs v-model="activeName" @tab-click="changeStatus">-->
|
||
<!-- <el-tab-pane :label="`全部(${allNum})`" name="all">-->
|
||
<!-- </el-tab-pane>-->
|
||
<!-- <el-tab-pane :label="`待报价(${noQuoteNum})`" name="noQuote"></el-tab-pane>-->
|
||
<!-- <el-tab-pane :label="`待选商(${notPickNum})`" name="notPick"></el-tab-pane>-->
|
||
<!-- <el-tab-pane :label="`已选商(${pickedNum})`" name="picked"></el-tab-pane>-->
|
||
<!-- </el-tabs>-->
|
||
<!-- <div class="search">-->
|
||
<!-- <view class="p">-->
|
||
<!-- <el-select v-model="value2" placeholder="请选择">-->
|
||
<!-- <el-option v-for="item in options2" :key="item.value" :label="item.label"-->
|
||
<!-- :value="item.value">-->
|
||
<!-- </el-option>-->
|
||
<!-- </el-select>-->
|
||
<!-- </view>-->
|
||
<!-- <view class="p">-->
|
||
<!-- <el-date-picker v-model="value1" type="date" placeholder="选择日期">-->
|
||
<!-- </el-date-picker>-->
|
||
<!-- </view>-->
|
||
<!-- <view class="p">-->
|
||
<!-- <el-input placeholder="请输入内容" v-model="input3" class="input-with-select"-->
|
||
<!-- @change="onSearch">-->
|
||
<!-- <i slot="append" class="el-icon-search" @click="onSearch"></i>-->
|
||
<!-- </el-input>-->
|
||
<!-- </view>-->
|
||
<!-- </div>-->
|
||
<!-- </el-card>-->
|
||
<el-card shadow="never" v-if="['2'].includes(menuIndex)">
|
||
<el-tabs v-model="oldSignMethod" @tab-click="changeOldStatus">
|
||
<el-tab-pane :label="`全部`" name="all">
|
||
</el-tab-pane>
|
||
<el-tab-pane :label="`线上签约`" name="0"></el-tab-pane>
|
||
<el-tab-pane :label="`线下签约`" name="1"></el-tab-pane>
|
||
</el-tabs>
|
||
</el-card>
|
||
<el-card shadow="never" v-if="['3'].includes(menuIndex)">
|
||
<el-tabs v-model="selfStatus" @tab-click="getSelfSupportList(1)">
|
||
<el-tab-pane :label="`全部`" name="all">
|
||
</el-tab-pane>
|
||
<el-tab-pane :label="`未被选商`" name="0"></el-tab-pane>
|
||
<el-tab-pane :label="`已被选商`" name="1"></el-tab-pane>
|
||
</el-tabs>
|
||
</el-card>
|
||
<el-card shadow="never">
|
||
<template v-if="menuIndex === '0'">
|
||
<view class="transaction-list">
|
||
<view class="item" v-for="(item, index) in spotList" :key="index">
|
||
<view class="info pointer"
|
||
@click="navTo(`/pages/spot/goods/detail?id=${item._id}`)">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status">
|
||
<view class="text">{{
|
||
item.status === 0 ? '发布中' : '已选商'
|
||
}}
|
||
</view>
|
||
<view class="sjx"></view>
|
||
</view>
|
||
<span class="item-title">{{ item.name }}</span>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-shopping-bag-1"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">现货库存</view>
|
||
<view class="unit">{{ item.stock }}</view>
|
||
</view>
|
||
</view>
|
||
<view class="item" style="margin-left: 100px;">
|
||
<view class="icon">
|
||
<i class="el-icon-location-outline"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">供货地址</view>
|
||
<view class="unit">{{
|
||
item.address.province.name + "-" + item.address.city.name + "-" + item.address.area.name
|
||
}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<!-- <text>交易编号:{{ item.orderNo }}</text>-->
|
||
<text>发布时间:{{ item._add_time_str }}</text>
|
||
</view>
|
||
<!-- <view class="status">-->
|
||
<!-- <view class="icon">-->
|
||
<!-- <img src="/static/images/store/choose.png" alt=""-->
|
||
<!-- v-if="item.status === 1"/>-->
|
||
<!-- <img src="/static/images/store/unchoose.png" alt="" v-else/>-->
|
||
<!-- </view>-->
|
||
<!-- </view>-->
|
||
</view>
|
||
<view class="tool">
|
||
<view class="btn">
|
||
<!-- <el-button size="small" plain style="width: 160px;" v-if="item.status === 0"-->
|
||
<!-- @click.native="editEnquiry(item._id)">编辑询价详情-->
|
||
<!-- </el-button>-->
|
||
<el-button size="small" plain type="danger" style="width: 160px;"
|
||
@click.native="navTo(`/pages/spot/goods/detail?id=${item._id}`)">
|
||
查看详情
|
||
</el-button>
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1"
|
||
@click.native="navTo('/pages/contract/index')">去创建合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="danger" v-if="item.status === 0"
|
||
@click.native="showSpotModal(item)"
|
||
style="width: 160px;">查看意向合作列表
|
||
</el-button>
|
||
<el-button size="small" type="success" plain style="width: 160px;" v-else
|
||
>查看交易方
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="text" @click.native="showSpotModal(item)"
|
||
style="width: 160px;">共收到{{ item.quoteNum }}个意向
|
||
</el-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="total"
|
||
:page-size="pageSize" @current-change="handleCurrentChange">
|
||
</el-pagination>
|
||
</view>
|
||
<view class="w-100p flex justify-end text-main mt-20 "
|
||
@click="navTo('/pages/spot/goods/my')">
|
||
<text class="pointer">查看历史发布记录</text>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="menuIndex === '1'">
|
||
<view class="transaction-list">
|
||
<view class="item" v-for="(item, index) in enquiryList" :key="index">
|
||
<view class="info pointer" @click="navTo(`/pages/enquiry/detail?id=${item._id}`)">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status">
|
||
<view class="text">{{
|
||
item.status === 0 ? '发布中' : '已选商'
|
||
}}
|
||
</view>
|
||
<view class="sjx"></view>
|
||
</view>
|
||
<span class="item-title">{{ item.title }}</span>
|
||
<el-tag effect="plain" size="mini" class="el-tag">
|
||
{{ item.signMethod === 0 ? '线上签约' : '线下签单' }}
|
||
</el-tag>
|
||
<view v-if="item.status === 1 && item.signMethod === 1"
|
||
class="ml-20 flex justify-start items-center">
|
||
<switch-icon theme="outline" size="20" fill="#000000"
|
||
strokeLinecap="square"/>
|
||
<el-tag size="mini" type="warning" class="pointer"
|
||
@click.native="enquiryChangeToOnlineSign(item._id, index)">
|
||
切换至线上交易
|
||
</el-tag>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-shopping-bag-1"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">采购量</view>
|
||
<view class="unit">{{
|
||
item.productNum
|
||
}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="item" style="margin-left: 100px;">
|
||
<view class="icon">
|
||
<i class="el-icon-location-outline"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">交易地址</view>
|
||
<view class="unit">{{ item.fullAddress }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<text>交易编号:{{ item.enquiryNo }}</text>
|
||
<text>发布时间:{{ item._add_time_str }}</text>
|
||
</view>
|
||
<view class="status">
|
||
<view class="icon">
|
||
<img src="/static/images/store/choose.png" alt=""
|
||
v-if="item.status === 1"/>
|
||
<img src="/static/images/store/unchoose.png" alt=""
|
||
v-if="item.status === 0"/>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tool">
|
||
<view class="btn">
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1"
|
||
@click.native="navTo('/pages/contract/index?tab=1')">
|
||
签署合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2"
|
||
@click.native="navTo('/pages/contract/index?tab=2')">
|
||
查看合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)"
|
||
@click.native="navTo('/pages/contract/index?tab=0')">
|
||
合同待创建
|
||
</el-button>
|
||
</view>
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status === 2"
|
||
@click.native="navTo('/pages/order/order')">去订单
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<!-- <el-button size="small" type="danger" v-if="item.status === 0"-->
|
||
<!-- @click.native="showEnquiryModal(item)"-->
|
||
<!-- style="width: 160px;">查看收到的报价列表-->
|
||
<!-- </el-button>-->
|
||
<el-button size="small" type="success" plain style="width: 160px;"
|
||
v-if="item.status === 1"
|
||
@click.native="showOtherUser(item)">查看交易方
|
||
</el-button>
|
||
</view>
|
||
<!-- <view class="btn">-->
|
||
<!-- <el-button size="small" type="text"-->
|
||
<!-- style="width: 160px;">共收到{{ item.quoteNum }}个报价-->
|
||
<!-- </el-button>-->
|
||
<!-- </view>-->
|
||
</view>
|
||
</view>
|
||
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="total"
|
||
:page-size="pageSize" @current-change="handleCurrentChange">
|
||
</el-pagination>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="menuIndex === '2'">
|
||
<view class="transaction-list">
|
||
<view class="item" v-for="(item, index) in oldList" :key="index">
|
||
<view class="info pointer">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status"
|
||
@click="navTo(`/pages/index/old/detail?id=${item._id}`)">
|
||
<view class="text">{{
|
||
item.status === 0 ? '发布中' : '已选商'
|
||
}}
|
||
</view>
|
||
<view class="sjx"></view>
|
||
</view>
|
||
<span class="item-title"
|
||
@click="navTo(`/pages/index/old/detail?id=${item._id}`)">{{
|
||
item.title
|
||
}}</span>
|
||
<template v-if="item.type !== 3">
|
||
<el-tag effect="plain" size="mini" class="el-tag">
|
||
{{ item.signMethod === 0 ? '线上签约' : '线下签单' }}
|
||
</el-tag>
|
||
<view v-if="item.status === 1 && item.signMethod === 1"
|
||
class="ml-20 flex justify-start items-center">
|
||
<switch-icon theme="outline" size="20" fill="#000000"
|
||
strokeLinecap="square"/>
|
||
<el-tag size="mini" type="warning" class="pointer"
|
||
@click.native="oldChangeToOnlineSign(item._id, index)">
|
||
切换至线上交易
|
||
</el-tag>
|
||
</view>
|
||
</template>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-shopping-bag-1"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">类型</view>
|
||
<view class="unit">{{
|
||
item.typeStr
|
||
}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="item" style="margin-left: 100px;">
|
||
<view class="icon">
|
||
<i class="el-icon-location-outline"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">交易地址</view>
|
||
<view class="unit"
|
||
v-if="item.addressRegion && item.addressRegion.province">
|
||
{{
|
||
item.addressRegion.province.name
|
||
}}{{
|
||
item.addressRegion.city.name
|
||
}}{{ item.addressRegion.area.name }}{{ item.addressDetail }}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<text>交易编号:{{ item._id }}</text>
|
||
<text>发布时间:{{ item._add_time_str }}</text>
|
||
</view>
|
||
<view class="status" v-if="item.type < 3">
|
||
<view class="icon">
|
||
<img src="/static/images/store/choose.png" alt=""
|
||
v-if="item.status === 1"/>
|
||
<img src="/static/images/store/unchoose.png" alt=""
|
||
v-if="item.status === 0"/>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tool" v-if="item.type < 3">
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1"
|
||
@click.native="navTo('/pages/contract/index?tab=1')">
|
||
签署合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2"
|
||
@click.native="navTo('/pages/contract/index?tab=2')">
|
||
查看合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)"
|
||
@click.native="navTo('/pages/contract/index?tab=0')">
|
||
合同待创建
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="danger" v-if="item.status === 0"
|
||
@click.native="showOldModal(item)"
|
||
style="width: 160px;">查看意向合作列表
|
||
</el-button>
|
||
<el-button size="small" type="success" plain style="width: 160px;" v-else
|
||
@click.native="showOtherUser(item)">查看交易方
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="text" @click.native="showOldModal(item)"
|
||
style="width: 160px;">共收到{{ item.quoteNum }}个报价
|
||
</el-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="total"
|
||
:page-size="pageSize" @current-change="handleCurrentChange">
|
||
</el-pagination>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="menuIndex === '3'">
|
||
<view class="transaction-list">
|
||
<view class="item" v-for="(item, index) in selfSupportList.rows" :key="index">
|
||
<view class="info ">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status pointer">
|
||
<view class="text">{{
|
||
item.sheet.status === 0 ? '待报价' : (item.sheet.status === 1 ? '待选商' : '已选商')
|
||
}}
|
||
</view>
|
||
<view class="sjx pointer"></view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-location-outline"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">{{ item.sheet.desc ? `产品描述:${item.sheet.desc}` : '自营询价' }}</view>
|
||
<view class="unit" v-if="item.sheet.province">{{
|
||
item.sheet.province.name
|
||
}}{{ item.sheet.city.name }}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<text>发布时间:{{ item.sheet._add_time_str }}</text>
|
||
</view>
|
||
<view class="status">
|
||
<view class="icon">
|
||
<img src="/static/images/store/choose.png" alt=""
|
||
v-if="item.sheet.status === 2 && item.status === 1"/>
|
||
<img src="/static/images/store/unchoose.png" alt=""
|
||
v-if="item.sheet.status === 1 && item.status === 0"/>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tool">
|
||
<view class="btn">
|
||
<el-button size="small" plain style="width: 160px;margin: 10px"
|
||
@click.native="showDetail(item)">查看详情
|
||
</el-button>
|
||
<el-button size="small" type="success" plain
|
||
style="width: 160px;margin: 10px"
|
||
v-if="item.sheet.status === 1"
|
||
@click.native="toSelfSupportQuote(item)">立即报价
|
||
</el-button>
|
||
<el-button size="small" type="success" plain
|
||
style="width: 160px;margin: 10px"
|
||
v-if="item.sheet.status === 2 && item.status === 1"
|
||
@click.native="showOtherUser(item)">查看交易方
|
||
</el-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="selfSupportList.total"
|
||
:page-size="pageSize" @current-change="handleCurrentChange">
|
||
</el-pagination>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="menuIndex === '4'">
|
||
<view class="transaction-list">
|
||
<view class="item" v-for="(item, index) in processList" :key="index">
|
||
<view class="info ">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status pointer"
|
||
@click="navTo(`/pages/process/detail?id=${item._id}`)">
|
||
<view class="text">{{
|
||
item.status === 0 ? '发布中' : '已选商'
|
||
}}
|
||
</view>
|
||
<view class="sjx"></view>
|
||
</view>
|
||
<span class="item-title pointer"
|
||
@click="navTo(`/pages/process/detail?id=${item._id}`)">{{
|
||
item.title
|
||
}}</span>
|
||
<el-tag effect="plain" size="mini" class="el-tag">
|
||
{{ item.signMethod === 1 ? '线下签单' : '线上签约' }}
|
||
</el-tag>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-shopping-bag-1"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">加工量</view>
|
||
<view class="unit">{{ item.num }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<text>交易编号:{{ item.orderNo }}</text>
|
||
<text>发布时间:{{ item._add_time_str }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="tool">
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 1"
|
||
@click.native="navTo('/pages/contract/index?tab=1')">
|
||
签署合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && item.contract && item.contract.status === 2"
|
||
@click.native="navTo('/pages/contract/index?tab=2')">
|
||
查看合同
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" style="width: 160px;"
|
||
v-if="item.status !== 0 && item.signMethod !== 1 && (!item.contract || item.contract.status === 0)"
|
||
@click.native="navTo('/pages/contract/index?tab=0')">
|
||
合同待创建
|
||
</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="success" plain style="width: 160px;"
|
||
@click.native="showOtherUser(item)"
|
||
>查看交易方
|
||
</el-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="total"
|
||
:page-size="pageSize" @current-change="handleCurrentChange">
|
||
</el-pagination>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
</el-card>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
</view>
|
||
<common-footer></common-footer>
|
||
<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"/>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||
import {
|
||
Agreement,
|
||
Switch as SwitchIcon
|
||
} from "@icon-park/vue";
|
||
import EnquiryModal from "./components/enquiryModal.vue";
|
||
import ProcessModal from "./components/processModal.vue";
|
||
import SpotModal from "./components/spotModal.vue";
|
||
import OldModal from "./components/oldModal.vue";
|
||
import SelfSupportModal from "./components/selfSupportModal.vue";
|
||
import selfSupportQuoteModal from "./components/selfSupportQuoteModal.vue";
|
||
|
||
export default {
|
||
components: {
|
||
selfSupportQuoteModal,
|
||
OldModal,
|
||
SpotModal,
|
||
ProcessModal,
|
||
EnquiryModal,
|
||
Agreement,
|
||
SwitchIcon,
|
||
SelfSupportModal,
|
||
},
|
||
data() {
|
||
return {
|
||
provinceData: provinces,
|
||
cityData: citys,
|
||
areaData: areas,
|
||
activeName: 'all',
|
||
value: '',
|
||
value1: '',
|
||
options: [{
|
||
value: '金久信自营',
|
||
label: '金久信自营'
|
||
}],
|
||
value2: '',
|
||
options2: [{
|
||
value: '未开发票',
|
||
label: '自主交易'
|
||
}],
|
||
input3: '',
|
||
menuIndex: '1',
|
||
formData: {
|
||
status: 0,
|
||
tradeMethod: null
|
||
},
|
||
tableData: {},
|
||
pageSize: 10,
|
||
enquiryList: [],
|
||
spotList: [],
|
||
oldList: [],
|
||
selfSupportList: [],
|
||
total: 0,
|
||
notPickNum: 0,
|
||
pickedNum: 0,
|
||
noQuoteNum: 0,
|
||
allNum: 0,
|
||
processList: [],
|
||
oldSignMethod: 'all',
|
||
selfStatus: 'all',
|
||
}
|
||
},
|
||
onLoad(options) {
|
||
if (!vk.getVuex('$user.userInfo.mobile')) {
|
||
this.$confirm('请先绑定手机号', '提示', {
|
||
confirmButtonText: '确定',
|
||
showCancelButton: false,
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.redirectTo(`/pages/auth/login/wechat?state=jjx_` + vk.getVuex('$user.userInfo.accountType'))
|
||
}).catch(() => {
|
||
vk.redirectTo(`/pages/auth/login/wechat?state=jjx_` + vk.getVuex('$user.userInfo.accountType'))
|
||
})
|
||
return
|
||
}
|
||
if (options.menuIndex) {
|
||
this.menuIndex = String(options.menuIndex)
|
||
}
|
||
this.handleCurrentChange(1)
|
||
},
|
||
methods: {
|
||
navTo(url) {
|
||
vk.navigateTo({
|
||
url
|
||
})
|
||
},
|
||
menuSelect(e) {
|
||
this.menuIndex = String(e)
|
||
this.formData.status = Number(e)
|
||
this.handleCurrentChange(1)
|
||
},
|
||
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)
|
||
},
|
||
getEnquiryList(pageIndex = 1) {
|
||
vk.callFunction({
|
||
url: 'client/enquiry/sheet/kh/getList',
|
||
title: '加载中...',
|
||
data: {
|
||
userId: vk.getVuex('$user.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 = str
|
||
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,
|
||
otherUid: vk.getVuex('$user.userInfo._id'),
|
||
pageIndex,
|
||
pageSize: this.pageSize,
|
||
status: this.activeName
|
||
},
|
||
success: (res) => {
|
||
this.processList = res.rows
|
||
}
|
||
})
|
||
},
|
||
getSpotList(pageIndex = 1) {
|
||
vk.callFunction({
|
||
url: 'client/spot/goods/kh/getSelfOne',
|
||
data: {
|
||
userId: vk.getVuex('$user.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: vk.getVuex('$user.userInfo._id'),
|
||
pageIndex,
|
||
pageSize: this.pageSize,
|
||
signMethod: this.oldSignMethod === 'all' ? null : this.oldSignMethod,
|
||
sellerOnly: true
|
||
},
|
||
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 = '租赁'
|
||
if (item.rentType === 0 ) item.typeStr += '-承租'
|
||
else 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,
|
||
status: this.selfStatus === 'all' ? null : this.selfStatus
|
||
},
|
||
success: (res) => {
|
||
this.selfSupportList = res
|
||
this.total = res.total
|
||
}
|
||
})
|
||
},
|
||
toSelfSupportQuote(item) {
|
||
vk.navigateTo({url: `/pages/index/self-support/quote?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}) {
|
||
this.$refs.oldModal.open(_id, status, quoteList, signMethod)
|
||
},
|
||
editEnquiry(id) {
|
||
vk.navigateTo({
|
||
url: `/pages/enquiry/release?id=${id}`
|
||
})
|
||
},
|
||
enquiryChangeToOnlineSign(id, index) {
|
||
vk.callFunction({
|
||
url: ' client/enquiry/sheet/kh/changeToOnlineSign',
|
||
data: {
|
||
id
|
||
}
|
||
})
|
||
this.enquiryList[index].signMethod = 0
|
||
this.$confirm('切换成功,是否去创建合同?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.navigateTo({url: '/pages/contract/index'});
|
||
})
|
||
},
|
||
showOtherUser(item) {
|
||
if (item.otherUser) {
|
||
this.$confirm(`交易方联系方式:${item.otherUser.company.mobile ?? item.otherUser.person.mobile}`, '', {
|
||
cancelButtonText: '关闭',
|
||
showConfirmButton: false
|
||
})
|
||
} else {
|
||
this.$confirm(`交易方未留下联系方式`, '', {
|
||
cancelButtonText: '关闭',
|
||
showConfirmButton: false
|
||
})
|
||
}
|
||
},
|
||
oldChangeToOnlineSign(id, index) {
|
||
vk.callFunction({
|
||
url: 'client/old/kh/changeToOnlineSign',
|
||
data: {
|
||
id
|
||
}
|
||
})
|
||
this.oldList[index].signMethod = 0
|
||
this.$confirm('切换成功,是否去创建合同?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
vk.navigateTo({url: '/pages/contract/index'});
|
||
})
|
||
},
|
||
showDetail(info) {
|
||
info.sheet.quote = info
|
||
this.$refs.selfSupportModal.open(info.sheet)
|
||
},
|
||
changeOldStatus() {
|
||
this.getOldList(1)
|
||
},
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.w-1200 {
|
||
width: 1200px;
|
||
margin: 20px auto;
|
||
}
|
||
|
||
.contract-list {
|
||
background-color: #FFFFFF;
|
||
padding: 10px 20px 20px;
|
||
}
|
||
|
||
|
||
.transaction-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
.item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 10px 0;
|
||
border-bottom: 1px solid #f3f3f3;
|
||
|
||
.info {
|
||
position: relative;
|
||
border-right: 1px solid #f3f3f3;
|
||
flex: 1;
|
||
|
||
.name {
|
||
display: flex;
|
||
font-size: 16px;
|
||
font-weight: bold;
|
||
line-height: 1.6em;
|
||
align-items: center;
|
||
|
||
.item-title {
|
||
width: 200px;
|
||
}
|
||
|
||
.fabu-status {
|
||
margin-right: 20px;
|
||
font-weight: normal;
|
||
display: flex;
|
||
|
||
.text {
|
||
padding: 0 10px 0 20px;
|
||
font-size: 13px;
|
||
color: #fff;
|
||
background-color: #A92924;
|
||
}
|
||
|
||
.sjx {
|
||
border: 12px solid;
|
||
border-color: #A92924 #ffffff #A92924 #A92924;
|
||
position: relative;
|
||
}
|
||
|
||
// .text{
|
||
// color: #fff;
|
||
// background-color: #A92924
|
||
// }
|
||
}
|
||
|
||
.buyer,
|
||
.seller {
|
||
font-size: 14px;
|
||
font-weight: normal;
|
||
display: flex;
|
||
margin: 0 30px;
|
||
}
|
||
|
||
.el-tag {
|
||
margin-left: 10px;
|
||
}
|
||
}
|
||
|
||
.caigou {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
.item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 10px 0;
|
||
border: none;
|
||
|
||
.icon {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
margin: 10px;
|
||
background-color: #f3f3f3;
|
||
padding: 10px;
|
||
border-radius: 100px;
|
||
|
||
.el-icon-shopping-bag-1,
|
||
.el-icon-location-outline {
|
||
font-size: 30px;
|
||
}
|
||
}
|
||
|
||
.infos {
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
.unit {
|
||
color: #A92924
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.sub-title {
|
||
color: #999999;
|
||
|
||
text {
|
||
margin-right: 60px;
|
||
}
|
||
}
|
||
|
||
.action {
|
||
padding: 10px 0;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
|
||
.btn-buy,
|
||
.btn-close {
|
||
color: #A92924;
|
||
}
|
||
}
|
||
|
||
.status {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
|
||
.icon {
|
||
margin: 0 20px;
|
||
|
||
img {
|
||
width: 80px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.tool {
|
||
display: flex;
|
||
width: 200px;
|
||
align-items: center;
|
||
justify-content: space-around;
|
||
flex-direction: column;
|
||
|
||
.btn {
|
||
margin: 5px 0;
|
||
}
|
||
|
||
.price {
|
||
margin: 0 20px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
align-items: center;
|
||
|
||
.red {
|
||
font-size: 16px;
|
||
color: #A92924;
|
||
font-weight: bold;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.paginatio {
|
||
margin: 20px auto;
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
|
||
|
||
.contract-box {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
border-bottom: solid 1px #e8e8e8;
|
||
padding: 10rpx 0;
|
||
}
|
||
|
||
.contract-left {
|
||
}
|
||
|
||
.contract-right {
|
||
text-align: right;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.trade-method {
|
||
display: flex;
|
||
margin-bottom: 20px;
|
||
border-bottom: solid 2px #f4f4f4;
|
||
}
|
||
|
||
.trade-method-item {
|
||
cursor: pointer;
|
||
font-size: 18px;
|
||
margin-right: 15px;
|
||
height: 40px;
|
||
line-height: 40px;
|
||
}
|
||
|
||
.trade-method-item.active {
|
||
color: #A92924;
|
||
border-bottom: solid 2px #A92924;
|
||
}
|
||
|
||
.contract-left-top {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
}
|
||
|
||
.contract-product {
|
||
margin: 0 10px;
|
||
}
|
||
|
||
.contract-left-center {
|
||
height: 40px;
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
align-items: flex-start;
|
||
color: #999999;
|
||
font-size: 12px;
|
||
flex-direction: column;
|
||
margin-top: 5px;
|
||
}
|
||
|
||
.contract-left-bottom {
|
||
display: flex;
|
||
}
|
||
|
||
.contract-status {
|
||
display: flex;
|
||
}
|
||
|
||
.contract-status-tag {
|
||
margin-left: 2px;
|
||
}
|
||
|
||
.sign {
|
||
padding: 20px 20px 20px 25px;
|
||
font-size: 14px;
|
||
|
||
.icon {
|
||
line-height: 18px;
|
||
}
|
||
}
|
||
|
||
.search {
|
||
display: flex;
|
||
|
||
.p {
|
||
margin-right: 10px;
|
||
}
|
||
}
|
||
|
||
.el-select .el-input {
|
||
width: 130px;
|
||
}
|
||
|
||
.input-with-select .el-input-group__prepend {
|
||
background-color: #fff;
|
||
}
|
||
</style> |