Commit 94265561 authored by tianhongyang's avatar tianhongyang

fix bug

parent fd6d053f
......@@ -309,8 +309,7 @@ export const modifyBidOpeningRecordApi = (data) => request({
*/
export const removeBidOpeningRecordApi = (params) => request({
method: "DELETE",
url: "/business/open/tender",
params
url: `/business/open/tender/${params}`,
});
<svg width="24" height="24" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M23.063 13.171a1.2 1.2 0 011.874 0l13.503 16.88c.629.785.07 1.949-.937 1.949H10.497c-1.006 0-1.566-1.164-.937-1.95l13.503-16.879z"/></svg>
\ No newline at end of file
<svg width="24" height="24" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M24.937 34.829a1.2 1.2 0 01-1.874 0L9.56 17.949C8.93 17.165 9.49 16 10.497 16h27.006c1.007 0 1.566 1.164.937 1.95L24.937 34.829z"/></svg>
\ No newline at end of file
......@@ -16,3 +16,7 @@
.fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
.el-message {
z-index: 3000 !important;
}
/*
* @Author: thy
* @Date: 2023-10-26 14:56:41
* @LastEditors: thy
* @LastEditTime: 2023-10-26 16:00:22
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\postMessageBridge\bridge\index.js
*/
class PostMessageBridge {
constructor() {
}
}
\ No newline at end of file
<template>
<div @click = 'handleALL' class="app-container">
<div @click='handleALL' class="custom-list-container">
<div class="miantitle">
<span>客户管理</span>
<span> / 客户列表</span>
</div>
<div>
<el-card class="box-card noborder min1370">
<el-card class="box-card noborder">
<div class="tables ">
<div class="empty" v-if="tableData.total==0 && !isSkeleton">
<img src="@/assets/images/project/empty.png">
......@@ -18,52 +18,43 @@
<div>
<el-form ref="queryForm" :model="searchParam" :inline="true" size="small">
<el-form-item>
<el-cascader
ref="address1"
:class="[`select-adaptive-${inputID1}`]"
:options="addressList"
:props="addressProps"
v-model="address"
@change="iptAdaptive(inputID1,true)"
placeholder="地区选择"
collapse-tags
style="width: 130px;"
clearable></el-cascader>
<el-cascader ref="address1" :class="[`select-adaptive-${inputID1}`]" :options="addressList" :props="addressProps" v-model="address"
@change="iptAdaptive(inputID1,true)" placeholder="地区选择" collapse-tags style="width: 130px;" clearable></el-cascader>
</el-form-item>
<el-form-item prop="companyNatures">
<el-select v-model="searchParam.companyNatures" :class="[`select-adaptive-${inputID2}`]" style="width: 130px;" @change="iptAdaptive(inputID2,true)" multiple collapse-tags clearable class="form-content-width" placeholder="客户性质">
<el-select v-model="searchParam.companyNatures" :class="[`select-adaptive-${inputID2}`]" style="width: 130px;"
@change="iptAdaptive(inputID2,true)" multiple collapse-tags clearable class="form-content-width" placeholder="客户性质">
<el-option v-for="(item, index) in companyNaturelist" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item prop="isOn">
<el-select v-model="searchParam.isOn" :class="[`select-adaptive-${inputID3}`]" filterable clearable style="width: 130px;" @change="iptAdaptive(inputID3)" class="form-content-width" placeholder="上市公司">
<el-select v-model="searchParam.isOn" :class="[`select-adaptive-${inputID3}`]" filterable clearable style="width: 130px;"
@change="iptAdaptive(inputID3)" class="form-content-width" placeholder="上市公司">
<el-option v-for="(item, index) in isMajorlist" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item prop="creditLevels">
<el-select v-model="searchParam.creditLevels" :class="[`select-adaptive-${inputID4}`]" style="width: 130px;" @change="iptAdaptive(inputID4,true)" multiple collapse-tags clearable class="form-content-width" placeholder="资信评级">
<el-select v-model="searchParam.creditLevels" :class="[`select-adaptive-${inputID4}`]" style="width: 130px;"
@change="iptAdaptive(inputID4,true)" multiple collapse-tags clearable class="form-content-width" placeholder="资信评级">
<el-option v-for="(item, index) in creditLevellist" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item prop="companyName">
<!--<div class="newSearch">-->
<!--<el-input type="text" v-model="searchParam.companyName" clearable placeholder="输入企业名称查询" @change="clearname" >-->
<!--<i slot="prefix" class="el-input__icon"><img src="@/assets/images/project/sousuo.png" width="16px" @click="handleCurrentChange(1)"></i>-->
<!--</el-input>-->
<!--</div>-->
<!-- 未点击前的输入框样式 -->
<div class="normal-search-container" @click="showSearchBox = true" v-if="!showSearchBox">
<div class="normal-search-container" :class="{'is-hover-search' : searchHoverStatus}" @mouseover="searchHover($event)"
@mouseleave="searchUnHover($event,form)">
<img src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span>搜索</span>
<span v-show="!searchHoverStatus && !searchParam.companyName">搜索</span>
<el-input v-model="searchParam.companyName" placeholder="输入关键词查询" style="width:238px;" @focus="searchFocus($event)"
@blur="searchBlur($event)" @input="value => searchInput(value)" v-show="searchHoverStatus || searchParam.companyName"
@keydown.native.enter="handleSearch">
<template slot="suffix">
<transition mode="out-in" appear name="fade">
<img src="@/assets/images/enterprise/search-input-clear-icon.svg" alt=""
@click.stop="searchParam.companyName = '';handleSearch" v-show="showClearIcon">
</transition>
</template>
</el-input>
</div>
<!-- 输入框展开后样式 -->
<transition @enter="onEnter" appear mode="out-in">
<div class="cooperate-name enterprise-search-container" id="focus1" v-if="showSearchBox">
<el-input clearable @clear="handleSearch" @focus="clickFocus('focus1')" @blur="clickFocus('focus1')" v-model="searchParam.companyName"
placeholder="输入关键词查询"></el-input>
<span @click="handleSearch">搜索</span>
</div>
</transition>
</el-form-item>
</el-form>
</div>
......@@ -71,171 +62,127 @@
<div class="dc">
<div class="total">共{{tableData.total}}条</div>
<div class="btn-export" @click="pldrs"><img src="@/assets/images/project/import.png">批量导入</div>
<div class="btn btn_primary h32 p10" @click="opennew"><div class="img img1"></div>添加客户</div>
<div class="btn btn_primary h32 p10" @click="opennew">
<div class="img img1"></div>添加客户
</div>
</div>
</div>
<skeleton v-if="isSkeleton"></skeleton>
<div class="table-item">
<el-table v-show="!isSkeleton&&tableData.total > 0" class="fixed-table" v-horizontal-scroll="'hover'" ref="thistables"
:data="tableData.rows"
stripe border
style="width: 100%">
<el-table-column
prop="index"
label="序号"
fixed="left"
width="60">
:data="tableData.rows" stripe border style="width: 100%">
<el-table-column prop="index" label="序号" fixed="left" width="60">
<template slot-scope='scope'>
<span>{{ (searchParam.pageNum - 1) * searchParam.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="企业名称"
fixed="left"
width="316">
<el-table-column prop="date" label="企业名称" fixed="left" width="316">
<template slot-scope="scope">
<div class="ps1">
<div class="wordprimary ps2" @click="toDetail(scope.row,'business')" v-html="scope.row.companyName"></div>
<div class="ps3">
<el-tooltip class="item" effect="dark" content="写跟进" placement="top" transition="" :open-delay="450">
<div @click="toDetail(scope.row,'gjjl')"><img class="i" src="@/assets/images/project/edit_1.png"><img class="o" src="@/assets/images/project/edit_11.png"></div>
<div @click="toDetail(scope.row,'gjjl')"><img class="i" src="@/assets/images/project/edit_1.png"><img class="o"
src="@/assets/images/project/edit_11.png"></div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="编辑信息" placement="top" transition="" :open-delay="450">
<div @click="toDetail(scope.row,'business')"><img class="i" src="@/assets/images/project/edit_2.png"><img class="o" src="@/assets/images/project/edit_22.png"></div>
<div @click="toDetail(scope.row,'business')"><img class="i" src="@/assets/images/project/edit_2.png"><img class="o"
src="@/assets/images/project/edit_22.png"></div>
</el-tooltip>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="cooperationProject"
label="合作项目"
width="90">
<el-table-column prop="cooperationProject" label="合作项目" width="90">
<template slot-scope="scope">
{{scope.row.cooperationProject || '--'}}
</template>
</el-table-column>
<el-table-column
prop="followProject"
label="跟进项目"
width="90">
<el-table-column prop="followProject" label="跟进项目" width="90">
<template slot-scope="scope">
{{scope.row.followProject || '--'}}
</template>
</el-table-column>
<el-table-column
prop="reserveProject"
label="储备项目"
width="90">
<el-table-column prop="reserveProject" label="储备项目" width="90">
<template slot-scope="scope">
{{scope.row.reserveProject || '--'}}
</template>
</el-table-column>
<el-table-column
prop="legalPerson"
label="法定代表人"
width="110">
<el-table-column prop="legalPerson" label="法定代表人" width="110">
<template slot-scope="scope">
{{scope.row.legalPerson || '--'}}
</template>
</el-table-column>
<el-table-column
prop="registerAddress"
label="注册地区"
width="160">
<el-table-column prop="registerAddress" label="注册地区" width="160">
<template slot-scope="scope">
{{scope.row.registerAddress || '--'}}
</template>
</el-table-column>
<el-table-column
prop="registerCapitalStr"
label="注册资本金(万元)"
width="160">
<el-table-column prop="registerCapitalStr" label="注册资本金(万元)" width="160">
<template slot-scope="scope">
<span v-if="scope.row.registerCapital && scope.row.registerCapital>0">{{scope.row.registerCapital}}</span><span v-else>--</span>
</template>
</el-table-column>
<el-table-column
prop="creditLevel"
label="企业主体评级" width="120">
<el-table-column prop="creditLevel" label="企业主体评级" width="120">
<template slot-scope="scope">
{{scope.row.creditLevel || '--'}}
</template>
</el-table-column>
<el-table-column
prop="isOn"
label="上市公司" width="90">
<el-table-column prop="isOn" label="上市公司" width="90">
<template slot-scope="scope">
{{scope.row.isOn == 1?"是":"否"}}
</template>
</el-table-column>
<el-table-column
prop="isMajor"
label="局级大客户" width="90">
<el-table-column prop="isMajor" label="局级大客户" width="90">
<template slot-scope="scope">
<span v-if="scope.row.isMajor != null">
{{scope.row.isMajor == 1?"是":"否"}}
</span>
<span v-if="scope.row.isMajor != null">
{{scope.row.isMajor == 1?"是":"否"}}
</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column
prop="customerLevel"
label="客户等级" width="90">
<el-table-column prop="customerLevel" label="客户等级" width="90">
<template slot-scope="scope">
{{scope.row.customerLevel || '--'}}
</template>
</el-table-column>
<el-table-column
prop="companyNature"
label="客户性质" width="90">
<el-table-column prop="companyNature" label="客户性质" width="90">
<template slot-scope="scope">
{{scope.row.companyNature || '--'}}
</template>
</el-table-column>
<el-table-column
prop="companyLevel"
label="客户级别" width="90">
<el-table-column prop="companyLevel" label="客户级别" width="90">
<template slot-scope="scope">
{{scope.row.companyLevel || '--'}}
</template>
</el-table-column>
<el-table-column
prop="address"
label="企业母公司" width="200">
<el-table-column prop="address" label="企业母公司" width="200">
<template slot-scope="scope">
<div class="">{{scope.row.superCompany || '--'}}</div>
</template>
</el-table-column>
<el-table-column :key="keys"
prop="mainBusiness"
label="主营业务" width="300">
<el-table-column :key="keys" prop="mainBusiness" label="主营业务" width="300">
<template slot-scope="scope">
<div v-if="scope.row.mainBusiness == null || scope.row.mainBusiness == ''">--</div>
<div v-if="scope.row.mainBusiness1">
<div class="box" v-if="scope.row.sq1==true">{{scope.row.mainBusiness1}}...<span @click="sq1(scope.row,false)">更多</span></div>
<div class="box" v-else>{{scope.row.mainBusiness}}<span @click="sq1(scope.row,true)">收起</span></div>
<div class="box" v-if="scope.row.sq1==true">{{scope.row.mainBusiness1}}...<span @click="sq1(scope.row,false)">更多</span></div>
<div class="box" v-else>{{scope.row.mainBusiness}}<span @click="sq1(scope.row,true)">收起</span></div>
</div>
<div v-else>{{scope.row.mainBusiness}}</div>
</template>
</el-table-column>
<el-table-column
prop="companyAttribute" :key="keys+2"
label="发包属性" width="300">
<el-table-column prop="companyAttribute" :key="keys+2" label="发包属性" width="300">
<template slot-scope="scope">
<div v-if="scope.row.companyAttribute == null || scope.row.companyAttribute == ''">--</div>
<div v-if="scope.row.companyAttribute1">
<div class="box" v-if="scope.row.sq2==true">{{scope.row.companyAttribute1}}...<span @click="sq2(scope.row,false)">更多</span></div>
<div class="box" v-else>{{scope.row.companyAttribute}}<span @click="sq2(scope.row,true)">收起</span></div>
<div class="box" v-if="scope.row.sq2==true">{{scope.row.companyAttribute1}}...<span @click="sq2(scope.row,false)">更多</span></div>
<div class="box" v-else>{{scope.row.companyAttribute}}<span @click="sq2(scope.row,true)">收起</span></div>
</div>
<div v-else>{{scope.row.companyAttribute}}</div>
</template>
</el-table-column>
<el-table-column
prop="followUser"
label="跟进人" width="110">
<el-table-column prop="followUser" label="跟进人" width="110">
<template slot-scope="scope">
{{scope.row.followUser || '--'}}
</template>
......@@ -243,36 +190,26 @@
</el-table>
</div>
<div class="bottems" v-if="tableData.total>searchParam.pageSize">
<el-pagination
background
:page-size="searchParam.pageSize"
:current-page="searchParam.pageNum"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="tableData.total">
<el-pagination background :page-size="searchParam.pageSize" :current-page="searchParam.pageNum" @current-change="handleCurrentChange"
layout="prev, pager, next" :total="tableData.total">
</el-pagination>
</div>
</div>
<el-dialog
class="popups"
:visible.sync="dialogVisible"
width="534px"
:close-on-click-modal="false"
@close="resetForm('ruleForm')"
>
<el-dialog class="popups" :visible.sync="dialogVisible" width="534px" :close-on-click-modal="false" @close="resetForm('ruleForm')">
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>添加客户</span>
</div>
<el-form class="popform j" :model="queryParam" :rules="rules" ref="ruleForm" label-width="130px">
<el-form-item label="企业名称:" class="row" prop="companyName">
<el-form-item label="企业名称:" class="row" prop="companyName">
<el-input type="text" placeholder="请输入" v-model="queryParam.companyName" @input="getCompany(1)"></el-input>
<div class="resultlist infinite-list" v-if="showlist" id="box" v-infinite-scroll="load" style="overflow:auto">
<div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name" :key="companypage"></span></div>
<div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name"
:key="companypage"></span></div>
</div>
</el-form-item>
<el-form-item label="客户等级:" class="row">
<el-select placeholder="请选择" v-model="queryParam.customerLevel">
<el-select placeholder="请选择" v-model="queryParam.customerLevel">
<el-option v-for="(item,index) in customerLevel" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
......@@ -283,7 +220,8 @@
<el-input type="text" placeholder="请输入" v-model="queryParam.registerCapital" @input='number'></el-input>
</el-form-item>
<el-form-item label="企业注册地:" class="row">
<el-cascader :props="props" @change="getAddr($event)" ref="address" v-model="queryParam.address" :options="addressList" clearable></el-cascader>
<el-cascader :props="props" @change="getAddr($event)" ref="address" v-model="queryParam.address" :options="addressList"
clearable></el-cascader>
</el-form-item>
<el-form-item label="统一社会信用代码:" class="row">
<el-input type="text" placeholder="请输入" v-model="queryParam.creditCode"></el-input>
......@@ -302,73 +240,72 @@
</template>
<script>
import { getToken } from '@/utils/auth'
import '@/assets/styles/project.scss'
import { addCustomer, getCustomerList, importData } from '@/api/custom/custom'
import { getDictType, getEnterprise } from '@/api/main'
import prvinceTree from '@/assets/json/provinceTree'
import batchimport from '../../project/projectList/component/batchImport'
import skeleton from '../../project/projectList/component/skeleton'
import { encodeStr } from '@/assets/js/common'
import { v4 } from "uuid";
import gsap from "gsap";
export default {
import { getToken } from '@/utils/auth';
import '@/assets/styles/project.scss';
import { addCustomer, getCustomerList, importData } from '@/api/custom/custom';
import { getDictType, getEnterprise } from '@/api/main';
import prvinceTree from '@/assets/json/provinceTree';
import batchimport from '../../project/projectList/component/batchImport';
import skeleton from '../../project/projectList/component/skeleton';
import { encodeStr } from '@/assets/js/common';
import { v4 } from "uuid";
export default {
name: 'CustomList',
components:{batchimport,skeleton},
components: { batchimport, skeleton },
data() {
return{
return {
encodeStr,
pldr: false,
types:'custom',
searchParam:{
companyName:'',
pageNum:1,
pageSize:20
types: 'custom',
searchParam: {
companyName: '',
pageNum: 1,
pageSize: 20
},
address:'',
props:{ checkStrictly: true, expandTrigger: 'hover' },
dialogVisible:false,
textarea:"",
nowedit:-1,//当前正在编辑的文本
tipslit:[],//项目标签
tipsvalue:"",//标签填写内容
address: '',
props: { checkStrictly: true, expandTrigger: 'hover' },
dialogVisible: false,
textarea: "",
nowedit: -1,//当前正在编辑的文本
tipslit: [],//项目标签
tipsvalue: "",//标签填写内容
tableData: [],//列表
companData:[],//联想企业列表
companData: [],//联想企业列表
addressProps: {
multiple: true,
expandTrigger: 'hover'
},
//上市公司
isMajorlist:[
isMajorlist: [
{
dictValue: 0,
dictLabel:'否',
dictLabel: '否',
},
{
dictValue: 1,
dictLabel:'是',
dictLabel: '是',
}
],
companyNaturelist:[], //客户性质
creditLevellist:[], //资信评级
customerLevel:[],//客户等级
addressList:[],//地区
companyNaturelist: [], //客户性质
creditLevellist: [], //资信评级
customerLevel: [],//客户等级
addressList: [],//地区
//添加客户
queryParam:{
companyId:'',//jsk企业id
companyName:'',//客户名称(企业名称
customerLevel:'',//客户等级
legalPerson:'',//法定代表人
registerCapital:'',//注册资本
registerAddress:'',//企业注册地址
creditCode:'',//社会统一信用代码
address:'',//选择的地址
provinceId:'',
cityId:'',
districtId:'',
queryParam: {
companyId: '',//jsk企业id
companyName: '',//客户名称(企业名称
customerLevel: '',//客户等级
legalPerson: '',//法定代表人
registerCapital: '',//注册资本
registerAddress: '',//企业注册地址
creditCode: '',//社会统一信用代码
address: '',//选择的地址
provinceId: '',
cityId: '',
districtId: '',
},
rules:{
companyName:[{ required: true, message: '请输入非空格字符!', trigger: 'blur' },]
rules: {
companyName: [{ required: true, message: '请输入非空格字符!', trigger: 'blur' },]
},
//批量导入
action: process.env.VUE_APP_BASE_API + "/customer/importData",
......@@ -377,117 +314,126 @@
Authorization: "Bearer " + getToken(),
},
// isNew:true,
showlist:false,
keys:1,
isSkeleton:true,
companypage:1,
isscroll:false,
inputID1:this.getUid(),
inputID2:this.getUid(),
inputID3:this.getUid(),
inputID4:this.getUid(),
showSearchBox: false
}
showlist: false,
keys: 1,
isSkeleton: true,
companypage: 1,
isscroll: false,
inputID1: this.getUid(),
inputID2: this.getUid(),
inputID3: this.getUid(),
inputID4: this.getUid(),
showSearchBox: false,
searchHoverStatus: false,
showClearIcon: false
};
},
created() {
if(this.$route.query.key){
this.searchParam.companyName=this.$route.query.key;
if (this.$route.query.key) {
this.searchParam.companyName = this.$route.query.key;
}
if(this.$route.query.type === '1'){
this.searchParam.companyNatures=['国有企业']
if (this.$route.query.type === '1') {
this.searchParam.companyNatures = ['国有企业'];
}
if(this.$route.query.type === '2'){
this.searchParam.companyNatures=['央企']
if (this.$route.query.type === '2') {
this.searchParam.companyNatures = ['央企'];
}
if(this.$route.query.type ==='3'){
this.searchParam.companyNatures=['事业单位','机关单位']
if (this.$route.query.type === '3') {
this.searchParam.companyNatures = ['事业单位', '机关单位'];
}
this.$watch(() => this.$route.params,() => {
this.getCustomerList()
this.getDictType()
this.prvinceTree()
this.handleQuery()
this.searchParam.companyName=''
},
this.$watch(() => this.$route.params, () => {
this.getCustomerList();
this.getDictType();
this.prvinceTree();
this.handleQuery();
this.searchParam.companyName = '';
},
// 组件创建完后获取数据,
// 此时 data 已经被 observed 了
{ immediate: true }
)
);
},
methods:{
onEnter(el, done) {
gsap.from(el, {
opacity: 0,
width: 0,
});
gsap.to(el, {
opacity: 1,
width: 242,
onComplete() {
// 完成动画聚焦输入框
el.querySelector("input").focus();
done();
}
});
methods: {
searchFocus(event) {
const { target } = event;
if (target?.value?.length) {
this.showClearIcon = true;
}
},
searchBlur(event) {
this.showClearIcon = false;
},
searchInput(value) {
if (value?.length) {
this.showClearIcon = true;
}
},
searchHover(event) {
this.searchHoverStatus = true;
},
searchUnHover(event) {
if (!this.searchParam.companyName) {
this.searchHoverStatus = false;
}
},
async handleQuery() {
let [type1,type2] = await Promise.all([
let [type1, type2] = await Promise.all([
getDictType('company_nature_type'),
getDictType('credit_level_type'),
])
if(type1.code==200){
]);
if (type1.code == 200) {
type1.data.forEach(item => {
this.companyNaturelist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
})
this.companyNaturelist.push({ dictLabel: item.dictLabel, dictValue: item.dictLabel });
});
}
if(type2.code==200){
if (type2.code == 200) {
type2.data.forEach(item => {
this.creditLevellist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
})
this.creditLevellist.push({ dictLabel: item.dictLabel, dictValue: item.dictLabel });
});
}
},
sq1(item,sq){
this.$nextTick(()=>{
item.sq1 = sq
this.keys++ ;
})
sq1(item, sq) {
this.$nextTick(() => {
item.sq1 = sq;
this.keys++;
});
},
sq2(item,sq){
this.$nextTick(()=>{
item.sq2 = sq
this.keys++ ;
})
sq2(item, sq) {
this.$nextTick(() => {
item.sq2 = sq;
this.keys++;
});
},
handleALL(event){
handleALL(event) {
var one = document.getElementById("box");
if(one){
if(!one.contains(event.target)){
this.showlist = false
if (one) {
if (!one.contains(event.target)) {
this.showlist = false;
}
}
},
toct(){
this.dialogVisible = false
this.$router.push({path:'/macro/urban'})
toct() {
this.dialogVisible = false;
this.$router.push({ path: '/macro/urban' });
},
getDictType(){
getDictType() {
//获取客户等级
getDictType('customer_level_type').then(result=>{
this.customerLevel = result.code == 200 ? result.data:[]
})
getDictType('customer_level_type').then(result => {
this.customerLevel = result.code == 200 ? result.data : [];
});
},
pldrs(){
this.pldr = true
pldrs() {
this.pldr = true;
},
cancelimport(){
this.pldr = false
cancelimport() {
this.pldr = false;
},
//获取客户列表
getCustomerList(){
let params=this.searchParam
if(this.address.length > 0){
getCustomerList() {
let params = this.searchParam;
if (this.address.length > 0) {
let arr = this.$refs.address1.getCheckedNodes();
let provinceCode = [],cityCode = [],countyCode = [];
let provinceCode = [], cityCode = [], countyCode = [];
for (var i in arr) {
if (arr[i].parent) {
if (!arr[i].parent.checked) {
......@@ -495,175 +441,175 @@
!arr[i].hasChildren && countyCode.push(arr[i].value);
}
} else {
provinceCode.push(arr[i].value)
provinceCode.push(arr[i].value);
}
}
if(provinceCode.length > 0){
params.provinceIds=provinceCode
if (provinceCode.length > 0) {
params.provinceIds = provinceCode;
}
if(cityCode.length > 0){
params.cityIds=cityCode
if (cityCode.length > 0) {
params.cityIds = cityCode;
}
if(countyCode.length > 0){
params.districtIds=countyCode
if (countyCode.length > 0) {
params.districtIds = countyCode;
}
}else {
if(params.provinceIds){
delete params.provinceIds
} else {
if (params.provinceIds) {
delete params.provinceIds;
}
if(params.cityIds){
delete params.cityIds
if (params.cityIds) {
delete params.cityIds;
}
if(params.districtIds){
delete params.districtIds
if (params.districtIds) {
delete params.districtIds;
}
}
getCustomerList(params).then(result=>{
this.isSkeleton = false
this.tableData = result
this.tableData.rows.forEach(item=>{
item.registerCapital = item.registerCapital == null?null: item.registerCapital.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')
if(item.mainBusiness != "" && item.mainBusiness != null && item.mainBusiness.length>84){
item.mainBusiness1 = item.mainBusiness.substring(0,81)
item.sq1 = true
}else{
item.sq1 = false
getCustomerList(params).then(result => {
this.isSkeleton = false;
this.tableData = result;
this.tableData.rows.forEach(item => {
item.registerCapital = item.registerCapital == null ? null : item.registerCapital.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1');
if (item.mainBusiness != "" && item.mainBusiness != null && item.mainBusiness.length > 84) {
item.mainBusiness1 = item.mainBusiness.substring(0, 81);
item.sq1 = true;
} else {
item.sq1 = false;
}
if(item.companyAttribute != "" && item.companyAttribute != null && item.companyAttribute.length>84){
item.companyAttribute1 = item.companyAttribute.substring(0,81)
item.sq2 = true
}else{
item.sq2 = false
if (item.companyAttribute != "" && item.companyAttribute != null && item.companyAttribute.length > 84) {
item.companyAttribute1 = item.companyAttribute.substring(0, 81);
item.sq2 = true;
} else {
item.sq2 = false;
}
// console.log(item)
})
})
});
});
},
//跳转到客户详情
toDetail(row,type){
let customerId = row.customerId
let companyId = row.companyId
let path = type
toDetail(row, type) {
let customerId = row.customerId;
let companyId = row.companyId;
let path = type;
// if(type == "" && companyId == null){
// path = 'business'
// }
this.$router.push({path:'/enterprise/'+encodeStr(companyId),query:{customerId:customerId,path:path}})
this.$router.push({ path: '/enterprise/' + encodeStr(companyId), query: { customerId: customerId, path: path } });
},
handleSearch(){
handleSearch() {
this.$nextTick(() => {
this.searchParam.pageNum = 1
this.getCustomerList()
})
this.searchParam.pageNum = 1;
this.getCustomerList();
});
},
clearname(value){
if(value == ""){
this.handleCurrentChange(1)
clearname(value) {
if (value == "") {
this.handleCurrentChange(1);
}
},
//翻页
handleCurrentChange(val) {
this.isSkeleton = true
this.pldr=false
this.isSkeleton = true;
this.pldr = false;
// this.isNew = false
this.searchParam.pageNum=val
this.getCustomerList()
this.searchParam.pageNum = val;
this.getCustomerList();
},
//打开新建窗口
opennew(){
this.dialogVisible = true
opennew() {
this.dialogVisible = true;
},
getAddr(obj){
if(obj.length == 0){
this.queryParam.provinceId = ''
this.queryParam.cityId = ''
this.queryParam.districtId = ''
return false
getAddr(obj) {
if (obj.length == 0) {
this.queryParam.provinceId = '';
this.queryParam.cityId = '';
this.queryParam.districtId = '';
return false;
}
let labelString = this.$refs.address.getCheckedNodes()[0].pathLabels.join("-");
this.queryParam.registerAddress = labelString
this.queryParam.provinceId = obj[0]
this.queryParam.cityId = obj.length>=1 ? obj[1]:''
this.queryParam.districtId = obj.length>=2 ? obj[2]:''
this.queryParam.registerAddress = labelString;
this.queryParam.provinceId = obj[0];
this.queryParam.cityId = obj.length >= 1 ? obj[1] : '';
this.queryParam.districtId = obj.length >= 2 ? obj[2] : '';
},
//获取建设库客户
getCompany(value){
this.queryParam.companyId = null
if(value == 1){
this.companData = []
this.companypage = 1
getCompany(value) {
this.queryParam.companyId = null;
if (value == 1) {
this.companData = [];
this.companypage = 1;
}
if (this.queryParam.companyName.length>=2){
if (this.queryParam.companyName.length >= 2) {
let param = {
keyword:this.queryParam.companyName,
page:{
limit:20,
page:this.companypage
keyword: this.queryParam.companyName,
page: {
limit: 20,
page: this.companypage
}
}
getEnterprise(JSON.stringify(param)).then(result=>{
if(result.code != 200){
return false
};
getEnterprise(JSON.stringify(param)).then(result => {
if (result.code != 200) {
return false;
}
if(result.data.list != null && result.data.list.length>0){
this.isscroll = true
if (this.companData.length===0) {
this.companData = result.data.list
if (result.data.list != null && result.data.list.length > 0) {
this.isscroll = true;
if (this.companData.length === 0) {
this.companData = result.data.list;
} else {
let arr2 = result.data.list
let arr2 = result.data.list;
arr2.unshift(2, 0);
Array.prototype.splice.apply(this.companData, arr2);
}
if(this.companData.length===0) {
this.showlist = false
}else{
this.showlist = true
if (this.companData.length === 0) {
this.showlist = false;
} else {
this.showlist = true;
}
this.companypage += 1
}else{
this.isscroll = false
this.companypage += 1;
} else {
this.isscroll = false;
}
})
});
}
},
load(){
if(this.isscroll){
this.getCompany(2)
load() {
if (this.isscroll) {
this.getCompany(2);
}
},
selCompany(item){
this.queryParam.companyId = item.jskEid
this.queryParam.companyName = item.name.replace(/<[^>]+>/g, '')
this.queryParam.legalPerson = item.legalPerson
let registeredCapitalStr = ""
if(item.registeredCapitalStr == "0" || item.registeredCapitalStr == 0){
registeredCapitalStr = ''
}else{
registeredCapitalStr = item.registeredCapitalStr
selCompany(item) {
this.queryParam.companyId = item.jskEid;
this.queryParam.companyName = item.name.replace(/<[^>]+>/g, '');
this.queryParam.legalPerson = item.legalPerson;
let registeredCapitalStr = "";
if (item.registeredCapitalStr == "0" || item.registeredCapitalStr == 0) {
registeredCapitalStr = '';
} else {
registeredCapitalStr = item.registeredCapitalStr;
}
this.queryParam.registerCapital = registeredCapitalStr
this.queryParam.creditCode = item.creditCode
this.queryParam.provinceId = item.provinceId
this.queryParam.cityId = item.cityId
this.queryParam.districtId = item.cityId
this.queryParam.registerCapital = registeredCapitalStr;
this.queryParam.creditCode = item.creditCode;
this.queryParam.provinceId = item.provinceId;
this.queryParam.cityId = item.cityId;
this.queryParam.districtId = item.cityId;
let list = []
if(item.provinceId != null && item.provinceId != "")
list.push(item.provinceId)
if(item.cityId != null && item.cityId != "")
list.push(item.cityId)
if(item.districtId != null && item.districtId != "")
list.push(item.districtId)
this.$nextTick(()=>{
this.queryParam.address = list
let _this = this
setTimeout(function() {
if(_this.$refs.address){
_this.queryParam.registerAddress = _this.$refs.address.getCheckedNodes()[0].pathLabels.join("-")
let list = [];
if (item.provinceId != null && item.provinceId != "")
list.push(item.provinceId);
if (item.cityId != null && item.cityId != "")
list.push(item.cityId);
if (item.districtId != null && item.districtId != "")
list.push(item.districtId);
this.$nextTick(() => {
this.queryParam.address = list;
let _this = this;
setTimeout(function () {
if (_this.$refs.address) {
_this.queryParam.registerAddress = _this.$refs.address.getCheckedNodes()[0].pathLabels.join("-");
}
},1000)
})
this.showlist = false
}, 1000);
});
this.showlist = false;
},
//添加客户
submitForm(formName) {
......@@ -674,36 +620,36 @@
// }
this.$refs[formName].validate((valid) => {
if (valid) {
addCustomer(this.queryParam).then(result=>{
if(result.code == 200){
this.$message.success('添加成功!')
this.dialogVisible = false
this.handleCurrentChange(1)
this.resetForm('ruleForm')
}else{
this.$message.error(result.msg)
addCustomer(this.queryParam).then(result => {
if (result.code == 200) {
this.$message.success('添加成功!');
this.dialogVisible = false;
this.handleCurrentChange(1);
this.resetForm('ruleForm');
} else {
this.$message.error(result.msg);
}
})
});
} else {
}
});
},
resetForm(formName) {
this.queryParam = {
companyId:'',//jsk企业id
companyName:'',//客户名称(企业名称
customerLevel:'',//客户等级
legalPerson:'',//法定代表人
registerCapital:'',//注册资本
registerAddress:'',//企业注册地址
creditCode:'',//社会统一信用代码
address:'',//选择的地址
provinceId:'',
cityId:'',
districtId:'',
this.queryParam = {
companyId: '',//jsk企业id
companyName: '',//客户名称(企业名称
customerLevel: '',//客户等级
legalPerson: '',//法定代表人
registerCapital: '',//注册资本
registerAddress: '',//企业注册地址
creditCode: '',//社会统一信用代码
address: '',//选择的地址
provinceId: '',
cityId: '',
districtId: '',
},
this.dialogVisible = false
this.showlist = false
this.dialogVisible = false;
this.showlist = false;
},
//地区
......@@ -719,26 +665,26 @@
// })
// console.log(prvinceTree)
this.addressList = prvinceTree;
this.getadd(this.addressList)
this.getadd(this.addressList);
},
//处理注册地数据
getadd(row) {
this.addrcallback(row,this.getadd)
this.addrcallback(row, this.getadd);
},
addrcallback(row,callback){
if(row){
addrcallback(row, callback) {
if (row) {
row.forEach(item => {
item.value = item.id
callback && callback(item.children)
})
item.value = item.id;
callback && callback(item.children);
});
}
},
//输入数字
number(value){
if(value == '')
this.queryParam.registerCapital = value
number(value) {
if (value == '')
this.queryParam.registerCapital = value;
else
this.queryParam.registerCapital = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入6位小数
this.queryParam.registerCapital = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1');//输入6位小数
},
iptAdaptive(uid, multiple = false) {
multiple ? this.multipleAdaptiveHandle(uid) : this.iptAdaptiveHandle(uid);
......@@ -814,10 +760,10 @@
textContainer.textContent = iptChild.value ? iptChild.value : iptChild.getAttribute("placeholder");
document.body.append(textContainer);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let containerWidth=0
if(iptChild.value){
let containerWidth = 0;
if (iptChild.value) {
containerWidth = 70;
}else {
} else {
containerWidth = 130;
}
......@@ -837,227 +783,299 @@
</script>
<style lang="scss" scoped>
.app-container{
height: calc(100vh - 134px)
.custom-list-container {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
.miantitle {
padding: 12px 0px;
padding-top: 0px;
margin: 0px;
}
.box-card{
::v-deep .el-card {
.table_search {
.el-form-item {
.el-input {
.el-input__inner {
&::placeholder {
color: rgba(35, 35, 35, 0.8);
font-size: 14px;
}
&:focus {
color: rgba(35, 35, 35, 1);
}
}
.el-input__suffix {
.el-input__icon {
color: rgba(35, 35, 35, 0.8);
}
}
}
}
}
}
}
.box-card {
@import "@/assets/styles/search-common.scss";
padding-top: 16px;
width: 100%;
height: 100%;
.table_search{
::v-deep .el-form{
.el-input{
.table_search {
::v-deep .el-form {
.el-input {
line-height: 32px;
.el-input__inner{
.el-input__inner {
height: 32px;
line-height: 32px;
border-radius: 4px;
border: 0;
}
}
.is-focus{
.el-input__inner{
background: #F4F6F9;
.is-focus {
.el-input__inner {
background: #f4f6f9;
}
}
}
}
}
.box{
.box {
position: relative;
>span{
> span {
position: absolute;
right: 10px;
bottom: 0;
color: #0081FF;
color: #0081ff;
cursor: pointer;
&:hover{
color: #006AD1;
&:hover {
color: #006ad1;
}
}
}
.dc{
font-size: 12px;
color: #3D3D3D;
font-weight: 400;
position: relative;
&::after{
content: ' ';
width: 2px;
height: 2px;
background: rgba(35,35,35,0.4);
border-radius: 50%;
position: absolute;
top: 16px;
left: 14px;
}
>div{
display: inline-block;
margin-left: 20px;
}
}
.img.img1{
margin-right: 2px;
background: url('../../../../src/assets/images/project/add_2.png')no-repeat center center;
background-size: 100%;
.dc {
font-size: 12px;
color: #3d3d3d;
font-weight: 400;
position: relative;
&::after {
content: " ";
width: 2px;
height: 2px;
background: rgba(35, 35, 35, 0.4);
border-radius: 50%;
position: absolute;
top: 16px;
left: 14px;
}
.w88{
width: 88px;
> div {
display: inline-block;
margin-left: 20px;
}
.tables{
position: relative;
min-height: calc(100vh - 134px);
/*overflow: auto;*/
.empty{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
.btn{
margin-right: 8px;
margin-top: 16px;
}
}
.img.img1 {
margin-right: 2px;
background: url("../../../../src/assets/images/project/add_2.png") no-repeat
center center;
background-size: 100%;
}
.w88 {
width: 88px;
}
.tables {
position: relative;
min-height: calc(100vh - 134px);
/*overflow: auto;*/
.empty {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.btn {
margin-right: 8px;
margin-top: 16px;
}
.table_search{
::v-deep .el-cascader{
height: 32px;
line-height: 32px;
.el-input{
input{
height: 32px !important;
}
}
.el-cascader__tags{
flex-wrap: inherit;
margin-top: 1px;
.el-tag{
/*max-width: 120px;*/
}
}
.el-input__suffix{
top: 1px;
}
.table_search {
::v-deep .el-cascader {
height: 32px;
line-height: 32px;
.el-input {
input {
height: 32px !important;
}
}
.normal-search-container {
margin-left: 12px;
display: flex;
align-items: center;
cursor: pointer;
height: 34px;
&:hover {
& > span {
color: #0081ff;
}
.el-cascader__tags {
flex-wrap: inherit;
margin-top: 1px;
.el-tag {
/*max-width: 120px;*/
}
}
.el-input__suffix {
top: 1px;
}
}
::v-deep .normal-search-container {
height: 32px;
display: flex;
align-items: center;
&.is-hover-search {
width: 238px;
background: #f4f6f9;
border-radius: 4px 4px 4px 4px;
& > img {
width: 16px;
height: 16px;
margin-left: 12px;
cursor: unset;
}
}
&:hover {
& > span {
color: #232323;
color: rgba(35, 35, 35, 0.4);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
font-size: 14px;
color: #0081ff;
}
}
.cooperate-name {
& > img {
width: 16px;
height: 16px;
margin-left: 12px;
display: flex;
border-radius: 2px;
border: 1px solid #d9d9d9;
line-height: 34px;
height: 34px;
float: left;
span {
width: 60px;
cursor: pointer;
}
& > span {
color: rgba(35, 35, 35, 0.8);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
font-size: 14px;
cursor: pointer;
}
.el-input {
& > .el-input__inner {
border: none;
height: 32px;
line-height: 32px;
caret-color: #0081ff;
color: rgba(35, 35, 35, 0.8);
font-size: 14px;
background: #f5f5f5;
text-align: center;
color: #0081ff;
border: 1px solid #efefef;
border-left: 0;
cursor: pointer;
}
&.span-ba {
border: 1px solid #0081ff;
span {
color: #ffffff;
background: #0081ff;
border: 1px solid #0081ff;
background: #f4f6f9;
padding-right: 26px;
padding-left: 8px;
&::placeholder {
color: rgba(35, 35, 35, 0.4) !important;
font-size: 14px !important;
line-height: 32px;
}
}
::v-deep .el-input {
flex: 1;
.el-input__suffix {
right: 12px;
display: flex;
align-items: center;
.el-input__suffix-inner {
height: 14px;
width: 14px;
}
img {
cursor: pointer;
vertical-align: unset;
}
}
::v-deep .el-input__inner {
border: 0;
line-height: 32px;
height: 32px;
position: absolute;
top: 0;
padding-right: 28px;
font-size: 12px;
padding-left: 8px;
}
}
.cooperate-name {
margin-left: 12px;
display: flex;
border-radius: 2px;
border: 1px solid #d9d9d9;
line-height: 34px;
height: 34px;
float: left;
span {
width: 60px;
height: 32px;
line-height: 32px;
font-size: 14px;
background: #f5f5f5;
text-align: center;
color: #0081ff;
border: 1px solid #efefef;
border-left: 0;
cursor: pointer;
}
&.span-ba {
border: 1px solid #0081ff;
span {
color: #ffffff;
background: #0081ff;
border: 1px solid #0081ff;
}
}
::v-deep .el-input {
flex: 1;
}
::v-deep .el-input__inner {
border: 0;
line-height: 32px;
height: 32px;
position: absolute;
top: 0;
padding-right: 28px;
font-size: 12px;
padding-left: 8px;
}
}
}
.ps1{
}
.ps1 {
display: flex;
justify-content: space-between;
.ps2 {
width: 350px;
}
.ps3 {
width: 60px;
display: flex;
justify-content: space-between;
.ps2{
width: 350px;
}
.ps3{
width: 60px;
display: flex;
justify-content: right;
>div{
margin-left: 12px;
>img{
float: right;
margin: 3px 0 0 4px;
width: 14px;
}
.i{
display: inline-block;
}
.o{
justify-content: right;
> div {
margin-left: 12px;
> img {
float: right;
margin: 3px 0 0 4px;
width: 14px;
}
.i {
display: inline-block;
}
.o {
display: none;
}
&:hover {
cursor: pointer;
.i {
display: none;
}
&:hover{
cursor: pointer;
.i{
display: none;
}
.o{
display: inline-block;
}
.o {
display: inline-block;
}
}
}
}
.popbot{
.wordprimary{
display: inline;
padding-right: 26px;
}
}
.app-container{
height: auto;
}
.searchInput{
width: 240px;
}
.popbot {
.wordprimary {
display: inline;
padding-right: 26px;
}
}
.searchInput {
width: 240px;
}
</style>
......@@ -35,11 +35,6 @@
</transition>
</template>
</el-input>
<!-- <div class="cooperate-name enterprise-search-container" :id="'focus'+i">
<el-input clearable @clear="changeSelect" @focus="clickFocus('focus'+i)" @blur="clickFocus('focus'+i)" v-model="form.value"
:placeholder="form.placeholder" :style="form.width?'width:'+form.width+'px':'width:180px'"></el-input>
<span @click="changeSelect">搜索</span>
</div> -->
</div>
</template>
<!-- 多选 -->
......
......@@ -11,9 +11,9 @@
<script>
import { steerScroll } from '@/assets/js/jskplug';
import { dskAccessToken } from '@/api/common';
import {encodeStr} from "@/assets/js/common"
import { encodeStr } from "@/assets/js/common";
import MaxPageSizeTip from "@/views/components/MaxPageSizeTip.vue";
import { getUipIdByCid } from '@/api/macro/macro'
import { getUipIdByCid } from '@/api/macro/macro';
export default {
name: 'Enterprise',
components: {
......@@ -42,13 +42,13 @@ export default {
if (window.location.host === 'http://szh.jiansheku.com' || window.location.host === 'szh.jiansheku.com') {
this.domain = 'https://plug.jiansheku.com';
} else {
this.domain='https://pre-plug.jiansheku.com'
this.domain = 'https://pre-plug.jiansheku.com';
// this.domain = 'http://192.168.60.8:3400';
this.domain = 'http://192.168.60.210:3400';
this.domain = 'http://192.168.60.104:3400';
}
this.gettokens();
this.iframeObserver();
let that = this
let that = this;
window.addEventListener("message", this.pagecapListener, { passive: true });
window.addEventListener('message', this.linkListener, false);
},
......@@ -66,26 +66,26 @@ export default {
this.iframeIns.contentWindow.postMessage("removeHtmlLayoutStyle", { targetOrigin: this.domain, });
},
methods: {
linkListener(event){
let {data} = event
if(data.id){
getUipIdByCid([data.id]).then(res=>{
if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(data.id)})
}else{
this.$tab.openPage(data.title, '/company/'+this.encodeStr(data.id))
linkListener(event) {
let { data } = event;
if (data.id) {
getUipIdByCid([data.id]).then(res => {
if (res.code == 200) {
if (res.data && res.data.length > 0 && res.data[0].uipId) {
this.$router.push({ path: '/enterprise/' + this.encodeStr(data.id) });
} else {
this.$tab.openPage(data.title, '/company/' + this.encodeStr(data.id));
}
}
}).catch(error=>{
}).catch(error => {
});
}else{
if(data.url){
} else {
if (data.url) {
this.$tab.openPage(data.title, data.url).then(() => {
// 执行结束的逻辑
})
// 执行结束的逻辑
});
}
}
},
......@@ -151,9 +151,13 @@ export default {
<style lang="scss" scoped>
.market-container {
width: 100%;
height: 100%;
padding: 16px 24px;
padding-right: 15px;
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
.market-iframe {
width: 100%;
......
<template>
<div class="batch-import-com">
<!-- 导入弹窗 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px">
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xls、xlsx格式文件。</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm">确 定</el-button>
<el-button @click="upload.open = false">取 消</el-button>
</div>
</el-dialog>
<!--导入结果-->
<el-dialog title="导入结果" :visible.sync="upload.showResult" width="500px" class="batch-import-upload-dialog-container"
custom-class="batch-import-upload-dialog" @close="importResultClose">
<div class="batch-import-upload-inner">
<div class="result-count">
<span class="success">导入成功:</span>
<span>{{uploadResult.successCount}}</span>
</div>
<div class="result-count">
<span class="error">导入失败:</span>
<span>{{uploadResult.errorCount}}</span>
</div>
<el-table :data="uploadResult.errorMsg" border stripe v-if="uploadResult.errorMsg.length" class="error-msg-list-table">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="导入失败原因">
<template slot-scope="scope">
<span>{{scope.row}}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "batchImportCom",
props: {
uploadOptions: {
type: Object,
default: () => ({})
}
},
watch: {
"uploadOptions": {
handler(newValue, oldValue) {
this.upload = newValue;
},
deep: true
}
},
data() {
return {
// 导入参数
upload: this.uploadOptions,
// 导入结果
uploadResult: {
successCount: 0,
errorCount: 0,
errorMsg: []
}
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
if (response.code == 200) {
this.$message.success('上传成功!');
if (response.data) {
this.uploadResult.successCount = response.data.sucessCount;
this.uploadResult.errorCount = response.data.errorCount;
response.data.errorMsg ? this.uploadResult.errorMsg = response.data.errorMsg : null;
this.upload.showResult = true;
}
} else {
this.$message.success(`上传失败,${response.msg ? response.msg : "请根据模板正确填写表格内容!"}`);
}
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
},
/** 下载模板操作 */
importTemplate() {
let a = document.createElement("a");
a.setAttribute("href", this.upload.fileTemplateUrl);
a.setAttribute("download", `${this.upload.fileName}_${new Date().getTime()}.xlsx`);
document.body.appendChild(a);
a.click();
a.remove();
},
importResultClose() {
this.upload.showResult = false;
this.uploadResult = this.$options.data.call(this).uploadResult;
},
},
}
</script>
<style lang="scss" scoped>
.batch-import-com {
::v-deep.batch-import-upload-dialog-container {
.batch-import-upload-dialog {
width: 100%;
max-height: 85%;
overflow: auto;
.el-dialog__header {
position: sticky;
top: 0px;
background: #fff;
z-index: 99;
}
.batch-import-upload-inner {
width: 100%;
display: flex;
flex-direction: column;
.result-count {
line-height: 32px;
.success {
color: #67c23a;
}
.error {
color: #f56c6c;
}
}
.error-msg-list-table {
margin-top: 8px;
}
}
}
}
}
</style>
......@@ -3,7 +3,7 @@
<div class="bid-opening-record-inner">
<!-- 查询功能 -->
<div class="search-form-container">
<div class="left-form-title">基本信息</div>
<div class="left-form-title">开标记录</div>
<div class="right-form-btn-box">
<div class="search-btn add" @click.stop="addBidOpeningRecord">
<img src="@/assets/images/project/project-bid-opening-record-add.svg" alt="">
......@@ -25,7 +25,21 @@
<div class="table-data-list-container" v-else-if="!isLoadingData || !tableDataList.length">
<table-list-com :formColum="formColum" :queryParams="queryParams" :tableData="tableDataList" :tableDataTotal="tableDataTotal"
:needSelection="needSelection" :stickyHeader="{offsetTop:'48px',offsetBottom : '10px'}" @selectionChange="selectionChange"
@sort-change="sortChange" @handle-current-change="pageCurrentChange" ref="tableListComParent">
@handle-current-change="pageCurrentChange" ref="tableListComParent">
<template slot="tenderAmountHeader">
<div class="tender-amount-header">
<span>投标金额(万元)</span>
<div class="tender-amount-sort">
<svg-icon icon-class="asc" :class="{'sort-active' : queryParams.isAsc == 'asc'}"
@click.stop="sortChange('tenderAmount','asc')"></svg-icon>
<svg-icon icon-class="desc" :class="{'sort-active' : queryParams.isAsc == 'desc'}"
@click.stop="sortChange('tenderAmount','desc')"></svg-icon>
</div>
</div>
</template>
<template slot="tenderAmount" slot-scope="scope">
<span>{{parseFloat(scope.row.tenderAmount) ? scope.row.tenderAmount : "--"}}</span>
</template>
<template slot="action-field-bar" slot-scope="scope">
<div class="action-field-bar-container">
<span class="action-field-bar-btn modify" @click.stop="modifyBidOpeningRecord(scope.row)">编辑</span>
......@@ -41,17 +55,18 @@
:formRules="formRules" :formData="formData"></add-bid-opening-record>
<!-- 导入弹窗 -->
<batch-import-reset v-if="showImport" :importtype="types" @cancels="cancelimport" @getdatas="getdatas"></batch-import-reset>
<batch-import-com :uploadOptions="uploadOptions"></batch-import-com>
</div>
</template>
<script>
import skeleton from './skeleton';
import TableListCom from "@/components/TableListCom";
import BatchImportReset from "./batchImportReset";
import BatchImportCom from "./BatchImportCom";
import { getBidOpeningRecordListApi, addBidOpeningRecordApi, modifyBidOpeningRecordApi, removeBidOpeningRecordApi } from "@/api/project/project";
import AddBidOpeningRecord from "./AddBidOpeningRecord.vue";
import { getToken } from "@/utils/auth";
export default {
components: { skeleton, TableListCom, AddBidOpeningRecord, BatchImportReset },
components: { skeleton, TableListCom, AddBidOpeningRecord, BatchImportCom },
name: "bidOpeningRecord",
data() {
// 必填字符串长度验证
......@@ -100,12 +115,12 @@ export default {
isLoadingData: false,
// 列表列数据
formColum: [
{ label: '投标人', prop: 'tenderer', width: "468px" },
{ label: '企业性质', prop: 'tendererNature', width: "96px" },
{ label: '项目经理', prop: 'businessManager', width: "115px" },
{ label: '联系方式', prop: 'contact', width: "133px" },
{ label: '投标金额(万元)', prop: 'tenderAmount', width: "168px", sortable: "custom" },
{ label: '操作', prop: 'action-field-bar', minWidth: "151px", fixed: "right" },
{ label: '投标人', prop: 'tenderer', minWidth: "468px" },
{ label: '企业性质', prop: 'tendererNature', minWidth: "96px" },
{ label: '项目经理', prop: 'businessManager', minWidth: "115px" },
{ label: '联系方式', prop: 'contact', width: "133px", },
{ label: '投标金额(万元)', prop: 'tenderAmount', width: "168px", slot: true, slotHeader: true, slotName: "tenderAmountHeader" },
{ label: '操作', prop: 'action-field-bar', width: "151px", fixed: "right" },
],
needSelection: {
flag: true,
......@@ -141,8 +156,25 @@ export default {
selectionArray: [],
// 展示新增弹窗
showAddDialog: false,
// 导入弹窗
showImport: false
// 导入开标记录配置
uploadOptions: {
// 是否显示弹出层
open: false,
// 弹出层标题
title: "导入开标信息",
// 是否禁用上传
isUploading: false,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + `/business/open/tender/importData/${this.$route.query.id}`,
// 展示上传结果
showResult: false,
// 模板下载地址
fileTemplateUrl: "/file/bidOpeningRecordTemplate.xlsx",
// 模板名称
fileName: "bidOpeningRecordTemplate"
},
};
},
//可访问data属性
......@@ -244,9 +276,7 @@ export default {
try {
if (!this.selectionArray?.length && !id) return;
const array = id ? [{ id }] : this.selectionArray;
const result = await removeBidOpeningRecordApi({
ids: (array.map(item => item.id))
});
const result = await removeBidOpeningRecordApi((array.map(item => item.id)).join(","));
if (result.code == 200) {
this.getTableList();
}
......@@ -263,11 +293,11 @@ export default {
this.getTableList(pageNum, pageSize, orderByColumn, isAsc);
},
// 列排序
sortChange({ column, order, prop }) {
sortChange(prop, order) {
this.queryParams.orderByColumn = prop;
if (order == "ascending") {
if (order == "asc") {
this.queryParams.isAsc = "asc";
} else if (order == "descending") {
} else if (order == "desc") {
this.queryParams.isAsc = "desc";
}
this.hasConditions();
......@@ -279,10 +309,10 @@ export default {
},
// 批量导入
batchImport() {
this.showImport = true;
this.uploadOptions.open = true;
},
cancelimport() {
this.showImport = false;
this.uploadOptions.open = false;
},
getdatas() {
this.getTableList();
......@@ -399,6 +429,30 @@ export default {
}
}
}
.tender-amount-header {
display: flex;
align-items: center;
.tender-amount-sort {
margin-left: 5px;
display: flex;
flex-direction: column;
.svg-icon {
width: 10px;
height: 10px;
fill: #8bd1ff;
cursor: pointer;
&:hover {
fill: #0081ff;
}
&.sort-active {
fill: #0081ff;
}
}
}
}
}
}
}
......
......@@ -106,8 +106,8 @@ export default {
},
onSuccess(res, file, fileList) {
if (res.code == 200) {
this.successCount = res.successCount;
let str = '成功导入条数' + res.successCount + ',失败条数' + res.errorCount;
this.successCount = res.data.successCount;
let str = '成功导入条数' + res.data.successCount + ',失败条数' + res.data.errorCount;
this.messages = str;
this.addsuccess = true;
} else {
......
......@@ -2,8 +2,12 @@
<div class="app-container">
<el-card class="box-card noborder">
<div class="btns">
<div class="btn btn_default h28" @click="addNew(true)"><div class="img img1"></div>新建项目商机</div>
<div class="btn btn_primary h28" @click="pldrs"><div class="img img2"></div>批量导入</div>
<div class="btn btn_default h28" @click="addNew(true)">
<div class="img img1"></div>新建项目商机
</div>
<div class="btn btn_primary h28" @click="pldrs">
<div class="img img2"></div>批量导入
</div>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick" class="tabpane w100">
<el-tab-pane label="我参与的项目" name="first"></el-tab-pane>
......@@ -15,92 +19,90 @@
</div>
<div class="sellist">
<div class="selli">
<span>
<span>
地区团队
</span>
</span>
<div class="select-popper">
<span :class="{ color_text:searchParam.provinceId.length ||searchParam.cityId.length ||searchParam.districtId.length}">
项目地区{{searchParam.provinceId.length ||searchParam.cityId.length ||searchParam.districtId.length? searchParam.provinceId.length +searchParam.cityId.length +searchParam.districtId.length +"项": ""}}
<i class="el-icon-caret-bottom"></i>
</span>
<el-cascader class="cascader-region select-location"
ref="myCascader"
:props='props' :options="addressList"
@change="handleChange"></el-cascader>
<span :class="{ color_text:searchParam.provinceId.length ||searchParam.cityId.length ||searchParam.districtId.length}">
项目地区{{searchParam.provinceId.length ||searchParam.cityId.length ||searchParam.districtId.length? searchParam.provinceId.length +searchParam.cityId.length +searchParam.districtId.length +"项": ""}}
<i class="el-icon-caret-bottom"></i>
</span>
<el-cascader class="cascader-region select-location" ref="myCascader" :props='props' :options="addressList"
@change="handleChange"></el-cascader>
</div>
</div>
<div class="selli">
<span>
<span>
项目信息
</span>
<div class="select-popper">
<span :class="{color_text:searchParam.projectType.length}">
项目类型{{searchParam.projectType.length? searchParam.projectType.length + "项": ""}}
<i class="el-icon-caret-bottom"></i>
</span>
<div class="select-popper">
<span :class="{color_text:searchParam.projectType.length}">
项目类型{{searchParam.projectType.length? searchParam.projectType.length + "项": ""}}
<i class="el-icon-caret-bottom"></i>
<el-select placeholder="请选择" v-model="searchParam.projectType" multiple class="select-multiple">
<el-option v-for="(item,index) in projectType" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</div>
<div class="select-popper">
<el-dropdown @command="transactionPricehandleCommand" trigger="click" ref="transactionPriceShowPopper" :hide-on-click="false">
<span class="el-dropdown-link" :class="searchParam.minAmount ||searchParam.maxAmount ? 'color_text': ''">
投资估算{{searchParam.minAmount ||searchParam.maxAmount? " 1项": ""}}<i class="el-icon-caret-bottom"></i>
</span>
<el-select placeholder="请选择" v-model="searchParam.projectType" multiple class="select-multiple">
<el-option v-for="(item,index) in projectType" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</div>
<div class="select-popper">
<el-dropdown @command="transactionPricehandleCommand" trigger="click" ref="transactionPriceShowPopper" :hide-on-click="false">
<span class="el-dropdown-link" :class="searchParam.minAmount ||searchParam.maxAmount ? 'color_text': ''">
投资估算{{searchParam.minAmount ||searchParam.maxAmount? " 1项": ""}}<i class="el-icon-caret-bottom"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in amountOptions" :class="searchParam.minAmount == item.value[0] &&searchParam.maxAmount == item.value[1] &&
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in amountOptions" :class="searchParam.minAmount == item.value[0] &&searchParam.maxAmount == item.value[1] &&
!minAmount &&!maxAmount? 'color_text': '' " :key="i" :command="item.value">{{ item.label }}</el-dropdown-item>
<el-dropdown-item command="" style="padding: 0; text-indent: 20px">
<div @mouseenter="transactionPriceShowPopper = true" @mouseleave="transactionPriceShowPopper = false">
<span :class="(minAmount || maxAmount) &&searchParam.minAmount ==minAmount &&
<el-dropdown-item command="" style="padding: 0; text-indent: 20px">
<div @mouseenter="transactionPriceShowPopper = true" @mouseleave="transactionPriceShowPopper = false">
<span :class="(minAmount || maxAmount) &&searchParam.minAmount ==minAmount &&
searchParam.maxAmount == maxAmount? 'color_text': '' ">
自定义<i class="el-icon-arrow-right"></i>
</span>
<div class="jabph_popper_box" style="position: absolute" v-if="transactionPriceShowPopper">
<div class="jabph_popper_wrap">
<el-input class="jabph_popper_input" v-limit-num clearable v-model="minAmount"></el-input>
</div>
<div class="jabph_popper_wrap">
<el-input class="jabph_popper_input" v-limit-num clearable v-model="maxAmount"></el-input>
</div>
<div style="">
<el-button size="mini" @click="transactionPriceCancel">取消</el-button>
<el-button type="primary" size="mini" @click="transactionPricePopperConfirm">确定</el-button>
</div>
自定义<i class="el-icon-arrow-right"></i>
</span>
<div class="jabph_popper_box" style="position: absolute" v-if="transactionPriceShowPopper">
<div class="jabph_popper_wrap">
<el-input class="jabph_popper_input" v-limit-num clearable v-model="minAmount"></el-input>
</div>
<div class="jabph_popper_wrap">
<el-input class="jabph_popper_input" v-limit-num clearable v-model="maxAmount"></el-input>
</div>
<div style="">
<el-button size="mini" @click="transactionPriceCancel">取消</el-button>
<el-button type="primary" size="mini" @click="transactionPricePopperConfirm">确定</el-button>
</div>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="select-popper">
<span :class="{color_text:searchParam.projectStage.length}">
项目阶段{{searchParam.projectStage.length? searchParam.projectStage.length + "项": ""}}
</div>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="select-popper">
<span :class="{color_text:searchParam.projectStage.length}">
项目阶段{{searchParam.projectStage.length? searchParam.projectStage.length + "项": ""}}
<i class="el-icon-caret-bottom"></i>
</span>
<el-select v-model="searchParam.projectStage" class="select-multiple" multiple placeholder="请选择">
<el-option v-for="(item,index) in projectStage" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</div>
<div class="select-popper">
<el-dropdown trigger="click" placement='bottom-start'>
<div class="el-dropdown-link " :class="searchParam.status!=null?'select-active':''">
项目状态{{searchParam.status!=null?' 1项':''}}
<i class="el-icon-caret-bottom"></i>
</span>
<el-select v-model="searchParam.projectStage" class="select-multiple" multiple placeholder="请选择">
<el-option v-for="(item,index) in projectStage" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</div>
<div class="select-popper">
<el-dropdown trigger="click" placement='bottom-start'>
<div class="el-dropdown-link " :class="searchParam.status!=null?'select-active':''">
项目状态{{searchParam.status!=null?' 1项':''}}
<i class="el-icon-caret-bottom"></i>
</div>
<el-dropdown-menu slot="dropdown" class="select-list select-radio">
<el-dropdown-item v-for="(itme,i) in statusList" :key="i">
<el-radio :label="itme.value" v-model="searchParam.status" @input="statusBtn()">
{{itme.label}}
</el-radio>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<el-dropdown-menu slot="dropdown" class="select-list select-radio">
<el-dropdown-item v-for="(itme,i) in statusList" :key="i">
<el-radio :label="itme.value" v-model="searchParam.status" @input="statusBtn()">
{{itme.label}}
</el-radio>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
<div class="scbtns">
......@@ -115,7 +117,7 @@
<div class="dc">
<div class="total">{{total}}</div>
<!--<el-tooltip class="item" effect="dark" content="功能正在开发中" placement="top">-->
<div class="btn-export" @click="dc"><img src="@/assets/images/EXCEL.png">导出EXCEL</div>
<div class="btn-export" @click="dc"><img src="@/assets/images/EXCEL.png">导出EXCEL</div>
<!--</el-tooltip>-->
</div>
</div>
......@@ -134,11 +136,13 @@
<div class="datali" v-for="(item,index) in datalist">
<div class="det-title" @click="toDetail(item.id,'xmsl')">
<span v-html="item.projectName"></span> <span v-if="activeName!='first' && item.followTime" class="people"><i>{{item.nickName1}}</i>
<span v-if="item.provinceName != '' && item.provinceName!==null">{{item.provinceName}}-</span>
{{item.nickName}} <font color="#FA8A00">正在跟进</font></span></div>
<span v-if="item.provinceName != '' && item.provinceName!==null">{{item.provinceName}}-</span>
{{item.nickName}} <font color="#FA8A00">正在跟进</font></span>
</div>
<div class="det-tips">
<span class="tips tip1" v-for="label in item.labels">{{label}}</span>
<span v-if="item.address" class="tips tip2">{{item.address}}</span></div>
<span v-if="item.address" class="tips tip2">{{item.address}}</span>
</div>
<div class="det-contets">
<div class="det-con" v-if="item.projectType">
<span>项目类型:</span>
......@@ -154,12 +158,13 @@
</div>
<div class="det-con" v-if="item.ownerCompany ">
<span>业主单位:</span>
<span class="wordprimary" v-if="item.ownerCompanyCid||item.ownerCompanyUipId" @click="toEnterprise(item)" v-html="item.ownerCompany"></span>
<span class="wordprimary" v-if="item.ownerCompanyCid||item.ownerCompanyUipId" @click="toEnterprise(item)"
v-html="item.ownerCompany"></span>
<span v-else v-html="item.ownerCompany"></span>
</div>
</div>
<el-divider v-if="index != datalist.length-1"></el-divider>
<div class="operates" v-if="activeName=='first'">
<div class="operates" v-if="activeName=='first'">
<div class="i1" @click="toDetail(item.id,'gjjl')"><img src="@/assets/images/follow.png">跟进</div>
<div class="i2" @click="toDetail(item.id,'xmsl')"><img src="@/assets/images/edit1.png">编辑</div>
<div class="i3" @click="deldetail(index)"><img src="@/assets/images/delete.png">删除</div>
......@@ -174,13 +179,8 @@
</div>
</div>
<div class="pagination-box" v-if="total>searchParam.pageSize">
<el-pagination
background
:page-size="searchParam.pageSize"
:current-page="searchParam.pageNum"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
<el-pagination background :page-size="searchParam.pageSize" :current-page="searchParam.pageNum" @current-change="handleCurrentChange"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</el-card>
......@@ -191,203 +191,207 @@
</template>
<script>
import "@/assets/styles/project.scss"
import "@/assets/styles/public.scss"
import prvinceTree from '@/assets/json/provinceTree'
import {getProjectlist,delProject} from '@/api/project/project'
import {getDictType,} from '@/api/main'
import addproject from './component/addProject'
import batchimport from './component/batchImport'
import skeleton from './component/skeleton'
import {encodeStr} from "@/assets/js/common.js"
import "@/assets/styles/project.scss";
import "@/assets/styles/public.scss";
import prvinceTree from '@/assets/json/provinceTree';
import { getProjectlist, delProject } from '@/api/project/project';
import { getDictType, } from '@/api/main';
import addproject from './component/addProject';
import batchimport from './component/batchImport';
import skeleton from './component/skeleton';
import { encodeStr } from "@/assets/js/common.js";
export default {
name: 'ProjectList',
components:{addproject,batchimport,skeleton},
components: { addproject, batchimport, skeleton },
data() {
return {
encodeStr,
types:'project',
props:{multiple: true},
activeName:'first',
projectStage:[],//项目阶段
isshow:false,//新增商机
pldr:false,//批量导入
types: 'project',
props: { multiple: true },
activeName: 'first',
projectStage: [],//项目阶段
isshow: false,//新增商机
pldr: false,//批量导入
//项目地区
addressList:[],
addressList: [],
addressType: [],
// 查询参数
minAmount:'',//投资估算最小值
maxAmount:'',//投资估算最大值
minAmount: '',//投资估算最小值
maxAmount: '',//投资估算最大值
searchParam: {
isPrivate:1,//0 公司 1 个人
projectName:'',//项目名称
ownerCompany:'',//业主单位
projectType:'',//项目类型
projectStage:'',//项目阶段
minAmount:'',//投资估算最小值
maxAmount:'',//投资估算最大值
Amount:'',//投资估算
isPrivate: 1,//0 公司 1 个人
projectName: '',//项目名称
ownerCompany: '',//业主单位
projectType: '',//项目类型
projectStage: '',//项目阶段
minAmount: '',//投资估算最小值
maxAmount: '',//投资估算最大值
Amount: '',//投资估算
provinceId: [],
cityId: [],
districtId: [],
pageNum:1,
pageSize:20,
status:null,
pageNum: 1,
pageSize: 20,
status: null,
},
domicile:[],
projectType:[],//项目类型
projectCategory:[],//项目类别
statusList:[
domicile: [],
projectType: [],//项目类型
projectCategory: [],//项目类别
statusList: [
{
value:'0',
label:'储备中'
value: '0',
label: '储备中'
},
{
value:'1',
label:'跟进中'
value: '1',
label: '跟进中'
},
{
value:'2',
label:'已合作'
value: '2',
label: '已中标'
},
{
value: '3',
label: '未中标'
},
],
amountOptions:[
amountOptions: [
{
label: "5000万以下",
value: [0,5000],
value: [0, 5000],
},
{
label: "5000万-1亿",
value: [5000,10000],
value: [5000, 10000],
},
{
label: "1亿-3亿",
value: [10000,30000],
value: [10000, 30000],
},
{
label: "3亿以上",
value: [30000,''],
value: [30000, ''],
},
],
contractSignTimeValue: "",
transactionPriceShowPopper: false,
datalist:[],//列表数据
ondel:-1,
total:0,
isSkeleton:true
}
datalist: [],//列表数据
ondel: -1,
total: 0,
isSkeleton: true
};
},
created() {
},
mounted(){
this.prvinceTree()
mounted() {
this.prvinceTree();
//项目阶段
getDictType('project_stage_type').then(result=>{
this.projectStage = result.code == 200 ? result.data:[]
})
getDictType('project_stage_type').then(result => {
this.projectStage = result.code == 200 ? result.data : [];
});
//项目类型
getDictType('project_type').then(result=>{
this.projectType = result.code == 200 ? result.data:[]
})
getDictType('project_type').then(result => {
this.projectType = result.code == 200 ? result.data : [];
});
//项目类别
getDictType('project_category').then(result=>{
this.projectCategory = result.code == 200 ? result.data:[]
})
if(this.$route.query.type==1){
getDictType('project_category').then(result => {
this.projectCategory = result.code == 200 ? result.data : [];
});
if (this.$route.query.type == 1) {
this.activeName = 'second';
}
if(this.$route.query.status){
if (this.$route.query.status) {
this.searchParam.status = this.$route.query.status;
}
if(this.$route.query.projectName){
if (this.$route.query.projectName) {
this.searchParam.projectName = this.$route.query.projectName;
}
this.getList(1)
this.getList(1);
},
methods: {
statusBtn(){
statusBtn() {
},
dc(){
this.$message.warning('功能正在开发中')
dc() {
this.$message.warning('功能正在开发中');
},
deldetail(index){
this.ondel = index
deldetail(index) {
this.ondel = index;
},
deleteProject(id){
delProject(id).then(result =>{
if(result.code==200){
this.$message.success('删除成功!')
this.getList(1)
this.ondel = -1
}else{
this.$message.error(result.msg)
deleteProject(id) {
delProject(id).then(result => {
if (result.code == 200) {
this.$message.success('删除成功!');
this.getList(1);
this.ondel = -1;
} else {
this.$message.error(result.msg);
}
})
});
},
getdatas(){
this.getList(1)
getdatas() {
this.getList(1);
},
cancelimport(){
this.pldr = false
cancelimport() {
this.pldr = false;
},
pldrs(){
this.pldr = true
pldrs() {
this.pldr = true;
},
//获取商机列表
getList(pageNum){
this.isSkeleton = true
this.searchParam.pageNum = pageNum
if(this.activeName == 'first'){
this.searchParam.isPrivate = 1
}else{
this.searchParam.isPrivate = 0
getList(pageNum) {
this.isSkeleton = true;
this.searchParam.pageNum = pageNum;
if (this.activeName == 'first') {
this.searchParam.isPrivate = 1;
} else {
this.searchParam.isPrivate = 0;
}
this.searchParam.ownerCompany = this.searchParam.projectName
getProjectlist(this.searchParam).then(result=>{
this.isSkeleton = false
if(result.code == 200){
this.datalist = result.rows
this.total = result.total
this.datalist.forEach(item=>{
let str = item.provinceName
if(item.cityName != "" && item.cityName != null)
str += '-' +item.cityName
if(item.districtName != ""&& item.districtName != null)
str += '-' +item.districtName
item.address = str
item.nickName1 = item.nickName?item.nickName.slice(0,1):''
item.labels=[]
if(item.label!=null && item.label !=""){
item.labels = item.label.split(',')
this.searchParam.ownerCompany = this.searchParam.projectName;
getProjectlist(this.searchParam).then(result => {
this.isSkeleton = false;
if (result.code == 200) {
this.datalist = result.rows;
this.total = result.total;
this.datalist.forEach(item => {
let str = item.provinceName;
if (item.cityName != "" && item.cityName != null)
str += '-' + item.cityName;
if (item.districtName != "" && item.districtName != null)
str += '-' + item.districtName;
item.address = str;
item.nickName1 = item.nickName ? item.nickName.slice(0, 1) : '';
item.labels = [];
if (item.label != null && item.label != "") {
item.labels = item.label.split(',');
}
})
});
}
})
});
},
reset(){
reset() {
this.$nextTick(() => {
this.$refs.myCascader.$refs.panel.clearCheckedNodes()
this.$refs.myCascader.$refs.panel.activePath = []
})
this.searchParam ={
isPrivate:1,
projectName:'',//项目名称
ownerCompany:'',//业主单位
projectType:'',//项目类型
projectStage:'',//项目阶段
minAmount:'',//投资估算最小值
maxAmount:'',//投资估算最大值
Amount:'',//投资估算
provinceId: [],
cityId: [],
districtId: [],
pageNum:1,
pageSize:20,
status:null
}
this.getList(1)
this.$refs.myCascader.$refs.panel.clearCheckedNodes();
this.$refs.myCascader.$refs.panel.activePath = [];
});
this.searchParam = {
isPrivate: 1,
projectName: '',//项目名称
ownerCompany: '',//业主单位
projectType: '',//项目类型
projectStage: '',//项目阶段
minAmount: '',//投资估算最小值
maxAmount: '',//投资估算最大值
Amount: '',//投资估算
provinceId: [],
cityId: [],
districtId: [],
pageNum: 1,
pageSize: 20,
status: null
};
this.getList(1);
},
//地区
async prvinceTree() {
......@@ -402,44 +406,44 @@ export default {
// })
// console.log(prvinceTree)
this.addressList = prvinceTree;
this.getadd(this.addressList)
this.getadd(this.addressList);
},
//处理项目地区
getadd(row) {
this.addrcallback(row,this.getadd)
this.addrcallback(row, this.getadd);
},
addrcallback(row,callback){
if(row){
addrcallback(row, callback) {
if (row) {
row.forEach(item => {
item.value = item.id
callback && callback(item.children)
})
item.value = item.id;
callback && callback(item.children);
});
}
},
//新建项目
showNew(){
this.isshow = true
showNew() {
this.isshow = true;
},
addNew(isshow){
this.isshow = isshow
addNew(isshow) {
this.isshow = isshow;
},
add(){
this.isshow = false
this.getList(1)
add() {
this.isshow = false;
this.getList(1);
},
toDetail(id,tag){
this.$router.push({ path: '/project/projectList/detail', query: {id:id,tag:tag} });
toDetail(id, tag) {
this.$router.push({ path: '/project/projectList/detail', query: { id: id, tag: tag } });
},
toEnterprise(item){
if(item.ownerCompanyUipId){
this.$router.push({ path: '/enterprise/'+this.encodeStr(item.ownerCompanyCid)});
}else if(item.ownerCompanyCid){
this.$router.push({ path: '/company/'+this.encodeStr(item.ownerCompanyCid)});
toEnterprise(item) {
if (item.ownerCompanyUipId) {
this.$router.push({ path: '/enterprise/' + this.encodeStr(item.ownerCompanyCid) });
} else if (item.ownerCompanyCid) {
this.$router.push({ path: '/company/' + this.encodeStr(item.ownerCompanyCid) });
}
},
handleClick(){
this.reset()
handleClick() {
this.reset();
},
handleChange(value) {
// console.log(value);
......@@ -508,74 +512,77 @@ export default {
//翻页
handleCurrentChange(val) {
this.getList(val)
this.getList(val);
},
}
}
</script>
<style lang="scss" scoped>
.btn_primary{
margin-top: 16px;
}
.jabph_popper_box{
left: 110px;
}
.noborder{
position: relative;
.btn_primary {
margin-top: 16px;
}
.jabph_popper_box {
left: 110px;
}
.noborder {
position: relative;
}
.btns {
position: absolute;
top: -6px;
right: 12px;
z-index: 2;
.img.img1 {
background: url("../../../../src/assets/images/add.png") no-repeat center
center;
background-size: 100%;
}
.btns{
position: absolute;
top: -6px;
right: 12px;
z-index: 2;
.img.img1{
background: url('../../../../src/assets/images/add.png')no-repeat center center;
background-size: 100%;
}
.btn_default:hover{
.img1{
background: url('../../../../src/assets/images/add_1.png')no-repeat center center;
background-size: 100%;
}
}
.img.img2{
background: url('../../../../src/assets/images/import.png')no-repeat center center;
.btn_default:hover {
.img1 {
background: url("../../../../src/assets/images/add_1.png") no-repeat
center center;
background-size: 100%;
}
}
.scbtns{
border-top: 1px solid #EFEFEF;
padding: 24px 0 8px;
.btn{
margin: 0 16px 0 0;
}
.img.img2 {
background: url("../../../../src/assets/images/import.png") no-repeat center
center;
background-size: 100%;
}
.sellist{
}
.scbtns {
border-top: 1px solid #efefef;
padding: 24px 0 8px;
.btn {
margin: 0 16px 0 0;
}
}
.sellist {
width: 100%;
padding: 10px 0;
.selli {
width: 100%;
padding: 10px 0;
.selli{
width: 100%;
height: 34px;
line-height: 34px;
font-size: 14px;
color: #232323;
>span{
float: left;
margin-right: 28px;
opacity: 0.8;
}
height: 34px;
line-height: 34px;
font-size: 14px;
color: #232323;
> span {
float: left;
margin-right: 28px;
opacity: 0.8;
}
}
.titles{
color: #232323;
font-size: 16px;
font-weight: bold;
height: 60px;
line-height: 64px;
border-bottom: 1px solid #EFEFEF;
padding-left: 2px;
padding-right: 24px;
/*&::after{
}
.titles {
color: #232323;
font-size: 16px;
font-weight: bold;
height: 60px;
line-height: 64px;
border-bottom: 1px solid #efefef;
padding-left: 2px;
padding-right: 24px;
/*&::after{
content: " ";
width: 2px;
height: 14px;
......@@ -584,133 +591,133 @@ export default {
margin-left: -10px;
margin-top: 24px;
}*/
.dc{
width: 100%;
.dc {
width: 100%;
float: right;
font-size: 12px;
color: #3d3d3d;
font-weight: 400;
position: relative;
&::after {
content: " ";
width: 2px;
height: 2px;
background: rgba(35, 35, 35, 0.4);
border-radius: 50%;
position: absolute;
top: 30px;
left: 14px;
}
> div {
display: inline-block;
margin-left: 20px;
}
.btn-export {
float: right;
font-size: 12px;
color: #3D3D3D;
font-weight: 400;
position: relative;
&::after{
content: ' ';
width: 2px;
height: 2px;
background: rgba(35,35,35,0.4);
border-radius: 50%;
position: absolute;
top: 30px;
left: 14px;
}
>div{
display: inline-block;
margin-left: 20px;
}
.btn-export{
float: right;
margin-top: 18px;
}
margin-top: 18px;
}
}
.datalist{
.datali{
padding: 16px 16px 0;
position: relative;
.operates{
position: absolute;
z-index: 1;
right: 0;
top: 24px;
>div{
padding-right: 16px;
display: inline-block;
font-size: 12px;
>img{
float: left;
margin-right: 5px;
width: 16px;
}
}
.i1:hover{
color: #3CB4FF;
}
.i2:hover{
color: #0CBC6D;
}
.i3:hover{
color: #FF3C3C;
}
.tits{
padding: 12px 0;
}
.datalist {
.datali {
padding: 16px 16px 0;
position: relative;
.operates {
position: absolute;
z-index: 1;
right: 0;
top: 24px;
> div {
padding-right: 16px;
display: inline-block;
font-size: 12px;
> img {
float: left;
margin-right: 5px;
width: 16px;
}
}
.delform{
right: 16px;
top: -94px;
.btnsmall{
margin-top: 0;
}
.i1:hover {
color: #3cb4ff;
}
&:hover{
background-color: #F6F9FC;
cursor: pointer;
.i2:hover {
color: #0cbc6d;
}
.det-title{
color: #3D3D3D;
font-size: 16px;
font-weight: 700;
line-height: 23px;
padding-right: 190px;
.people{
padding-left: 10px;
color: #4f4f4f;
font-weight: 400;
font-size: 14px;
i{
width: 20px;
height: 20px;
background: #E3EEF9;
border-radius: 50%;
font-style: initial;
font-size: 12px;
display: inline-block;
color: #0081FF;
text-align: center;
line-height: 20px;
margin-right: 4px;
}
}
.i3:hover {
color: #ff3c3c;
}
.det-tips{
padding: 8px 0 ;
.tits {
padding: 12px 0;
}
.det-contets{
padding: 4px 0 16px;
.det-con{
font-size: 14px;
}
.delform {
right: 16px;
top: -94px;
.btnsmall {
margin-top: 0;
}
}
&:hover {
background-color: #f6f9fc;
cursor: pointer;
}
.det-title {
color: #3d3d3d;
font-size: 16px;
font-weight: 700;
line-height: 23px;
padding-right: 190px;
.people {
padding-left: 10px;
color: #4f4f4f;
font-weight: 400;
font-size: 14px;
i {
width: 20px;
height: 20px;
background: #e3eef9;
border-radius: 50%;
font-style: initial;
font-size: 12px;
display: inline-block;
padding-right: 32px;
&:last-child{
padding-right: 0;
}
span:nth-child(2n-1){
color: #a7a7a7;
}
color: #0081ff;
text-align: center;
line-height: 20px;
margin-right: 4px;
}
}
}
}
.popbot{
.wordprimary{
padding-right: 26px;
float: left;
margin-top: 6px;
.det-tips {
padding: 8px 0;
}
.btn_primary{
padding: 0;
.det-contets {
padding: 4px 0 16px;
.det-con {
font-size: 14px;
display: inline-block;
padding-right: 32px;
&:last-child {
padding-right: 0;
}
span:nth-child(2n-1) {
color: #a7a7a7;
}
}
}
}
.btn{
padding: 0 12px;
}
.popbot {
.wordprimary {
padding-right: 26px;
float: left;
margin-top: 6px;
}
.btn_primary {
padding: 0;
}
}
.btn {
padding: 0 12px;
}
</style>
......@@ -345,9 +345,6 @@
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<!--<div class="el-upload__tip" slot="tip">-->
<!--<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据-->
<!--</div>-->
<span>仅允许导入xls、xlsx格式文件。</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment