Commit 07a32ab2 authored by danfuman's avatar danfuman

修改

parent fc1da968
......@@ -66,3 +66,52 @@ export function getSupplierUnlimitedList(param) {
});
}
// 添加挂靠风险记录
export function addRiskRecord(data) {
return request({
url: '/laborLeaderCustomerRisk/addRiskRecord',
method: 'post',
data: data
})
}
// 查询挂靠风险列表
export function queryRiskList(param) {
return request({
url: '/laborLeaderCustomerRisk/queryRiskList',
method: 'Get',
params: param
})
}
// 添加劳务队队长
export function addLaborLeader(data) {
return request({
url: '/customerInfo/addLaborLeader',
method: 'post',
data: data
})
}
// 模糊查企业联想
export function companyList(data) {
return request({
url: '/enterprise/index',
method: 'post',
data: data
})
}
// 校验劳务队长身份证号是否存在
export function getLborLeaderId(id) {
return request({
url: `/customerInfo/checkLaborLeaderIdExist/${id}`,
method: 'get',
})
}
// 导出供应商分类列表
export function exportCustomerList(data) {
return request({
url: '/customerInfo/exportCustomerList',
method: 'post',
data: data
})
}
<template>
<div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams}">
<div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" v-loading="tableLoading" :data="tableData"
<el-table v-if="tableDataTotal>0" class="fixed-table" v-loading="tableLoading" :data="tableData" v-horizontal-scroll="'hover'"
element-loading-text="Loading" ref="tableRef" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}"
@sort-change="sortChange" @selection-change="selectionChange" :cell-class-name="cellClassName" :cell-style="cellStyle"
:row-class-name="rowClassName" :row-style="rowStyle" :height="height" :maxHeight="comMaxHeight" v-sticky-header="stickyHeader">
......
......@@ -61,18 +61,18 @@ export default {
},
data() {
return {
currentList: "project",
currentList: "consultingAgency",
toggleTabs: [
{
value: "project",
name: "工程基本信息",
value: "consultingAgency",
name: "咨询机构结算信息",
id: v4()
},
{
value: "consultingAgency",
name: "咨询机构结算信息",
value: "project",
name: "工程基本信息",
id: v4()
}
},
],
projectDetailInfo: {},
projectKey: "",
......
......@@ -174,8 +174,9 @@ export default {
formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, fixed: false, uid: v4() },
{ label: '项目列表', prop: 'projectName', width: "220px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '项目编码', prop: 'projectCode', width: "121px", uid: v4() },
{ label: '业主单位', prop: 'ownerName', slot: true, uid: v4(), width: "185px", showOverflowTooltip: true },
{ label: '咨询机构名称', prop: 'advisoryBodyName', width: "172px", slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '项目编码', prop: 'projectCode', width: "121px", uid: v4() },
{ label: '省市', prop: 'provinceName', width: "100px", uid: v4() },
{ label: '项目承接类型', prop: 'isinvestproject', width: "100px", uid: v4() },
{ label: '工程基础大类', prop: 'projectType1', minWidth: "100px", uid: v4() },
......@@ -186,7 +187,6 @@ export default {
{ label: '合同金额(元)', prop: 'contractOrigValue', width: "110px", align: "right", uid: v4() },
// { label: '业主单位', prop: 'ownerName', slot: true, uid: v4(), width: "185px", showOverflowTooltip: true },
// { label: '项目承接单位', prop: 'contractOrgName', width: "196px", slot: true, uid: v4() },
{ label: '咨询机构名称', prop: 'advisoryBodyName', width: "172px", slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '创建时间', prop: 'contractSignDate', width: "172px", uid: v4() },
],
fixedPropsKey: ["staticSerialNumber", "projectName"],
......
......@@ -193,6 +193,11 @@ export default {
{ title: '不良行为列表', pathName: 'badlist' },
]
},
{
title: '供应商风险', pathName: '', children: [
{ title: '供应商劳务挂靠风险', pathName: 'affiliationRisk' },
]
},
]
}
],
......
......@@ -91,6 +91,8 @@
<assessMent class="no-padding" v-if="currentPath.pathName=='assessMent'" :company-id="companyId" :companyInfo="companyInfo"></assessMent>
<!-- 不良行为列表 -->
<badlist class="no-padding" v-if="currentPath.pathName=='badlist'" :company-id="companyId" :companyInfo="companyInfo"></badlist>
<!-- 供应商劳务挂靠风险 -->
<affiliationRisk class="no-padding" v-if="currentPath.pathName=='affiliationRisk'" :company-id="companyId" :companyInfo="companyInfo"></affiliationRisk>
</template>
<template v-if="customerId && isCustomer">
<!-- 商务信息 -->
......@@ -168,6 +170,7 @@ import Managerial from "@/views/detail/party-a/internalCooperation/managerial";
import equipment from "@/views/detail/party-a/internalCooperation/equipment"; //内部合作 设备信息
import projectRecord from "@/views/detail/party-a/internalCooperation/projectRecord"; //内部合作 工程考察情况记录
import badlist from "@/views/detail/party-a/internalCooperation/badlist"; //不良行为列表
import affiliationRisk from "@/views/detail/party-a/internalCooperation/affiliationRisk"; //供应商劳务挂靠风险
import assessMent from "@/views/supplier/supplierlist/assessment"; //年度考评
import CooperationRecord from "@/views/detail/party-a/internalCooperation/cooperationRecord"; //内部合作 供应商合作记录
......@@ -237,6 +240,7 @@ export default {
AccessCondition,
assessMent,
badlist,
affiliationRisk,
CooperationRecord,
CooperativeConstructionUnit,
CooperativeGroup,
......
<template>
<div class="supplier">
<div class="search-supplier">
<div class="title_wrap">
<div class="enterprise_title">
供应商劳务挂靠风险
</div>
</div>
</div>
<div class="table-supplier table-supplier2">
<!--<el-divider class="supdivider"></el-divider>
<div class="total-title">
<div class="totals">{{total}}</div>
<p class="total-dc" @click="customerExport">
<img src="@/assets/images/EXCEL.png" alt="">
<span class="excel">导出EXCEL</span>
</p>
</div> -->
<div class="table-item-jf table-item-jf1 empty-table" v-if="total == 0 && !isSkeleton">
<img class="item-jf-img" src="@/assets/images/kong.png" alt="">
<div class="item-jf-titel">暂无相关数据</div>
<div class="item-jf-text">抱歉,暂无数据,试试更换搜索条件吧</div>
</div>
<skeleton v-if="isSkeleton"></skeleton>
<div class="table-item-jf table-item" v-if="!isSkeleton&&tableData.length>0">
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" class="table-item1 fixed-table" border highlight-current-row
:header-row-class-name="setHeaderRow" :cell-class-name="setCellClass" :row-class-name="setRowClass" :header-cell-class-name="setCellClass"
ref="theOwnerListTable" :row-key="'customerKey'">
<el-table-column type="index" label="序号" :fixed="tableColumnFixed" width="60" :resizable="false">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) *queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="劳务队长名称" :fixed="tableColumnFixed" width="120" :resizable="false">
<template slot-scope="scope">
<span v-html="scope.row.leaderName||'--'"></span>
</template>
</el-table-column>
<el-table-column label="身份证号" :fixed="tableColumnFixed" min-width="150" :resizable="false">
<template slot-scope="scope">
{{scope.row.laborCaptainIdCard||"--"}}
</template>
</el-table-column>
<el-table-column label="联系电话" min-width="120">
<template slot-scope="scope">
{{scope.row.laborCaptainPhone||"--"}}
</template>
</el-table-column>
<el-table-column label="挂靠单位" min-width="280" :resizable="false">
<template slot-scope="scope">
<router-link v-if="scope.row.customerCid" :to="`/enterprise/${encodeStr(scope.row.customerCid)}?companyName=${scope.row.customerName}`" tag="a"
class="wordprimary" v-html="scope.row.customerName"></router-link>
<span v-else v-html="scope.row.customerName"></span>
</template>
</el-table-column>
<el-table-column label="不良事由" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.blsy||"--"}}
</template>
</el-table-column>
<el-table-column label="不良行为情形" min-width="280" :resizable="false">
<template slot-scope="scope">
{{scope.row.badReason||"--"}}
</template>
</el-table-column>
<el-table-column label="添加人" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.dataSource === 0 ?'自主添加':'系统添加'}}
</template>
</el-table-column>
<el-table-column label="发生日期" min-width="160" :resizable="false">
<template slot-scope="scope">
{{scope.row.createTime||"--"}}
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination clearfix" v-show="total>queryParams.pageSize">
<el-pagination background :page-size="queryParams.pageSize" :current-page.sync="queryParams.pageNum" @current-change="handleCurrentChange" layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import '@/assets/styles/public.scss'
import '@/assets/styles/supplierlist.scss'
import mixin from '@/views/detail/party-a/mixins/mixin'
import InfoTable from '../component/infoTable';
import {queryRiskList} from '@/api/supplier/supplier';
export default {
name: 'ratinglist',
components: {InfoTable},
props: ['companyId', 'companyInfo'],
mixins: [mixin],
data(){
return{
detailInfo:{},
queryParams: {
customerCid: this.companyId,
pageNum: 1,
pageSize: 10,
},
total: 0,
isSkeleton:false,
tableData:[],
tableColumnFixed:false,
}
},
created() {
this.handleSearch()
},
methods:{
handleSearch(){
queryRiskList(this.queryParams).then(res=>{
this.isSkeleton = false
if(res.code == 200) {
this.total = res.total
this.tableData = res.rows
this.queryParams.pageNum = res.currentPage
}else{
this.total = 0
this.tableData = []
this.queryParams.pageNum = 1
}
})
},
handleExcel() {
},
customerExport(){
},
setHeaderRow() {
return "owner-table-list-header";
},
setCellClass({ row, column, rowIndex, columnIndex }) {
if (columnIndex == 1) {
return "enterprise-name-column";
}
},
setRowClass({ row, rowIndex }) {
return "enterprise-name-row";
},
handleCurrentChange(val){
this.queryParams.pageNum = val;
this.handleSearch();
}
}
}
</script>
<style lang="scss" scoped>
.infoTable-container{
margin-bottom: 16px;
}
::v-deep .el-form-item__label{
min-height: 40px!important;
}
.title_wrap{
border: none;
}
.title_wrap1{
padding: 0;
}
.detail-title{
border-radius: 4px 4px 0px 0px;
opacity: 1;
/* 自动布局 */
display: flex;
flex-direction: column;
padding: 16px;
gap: 16px;
background: #FFFFFF;
box-sizing: border-box;
/* 分割线 */
font-size: 14px;
color: rgba(35, 35, 35, 0.4);
.el-icon-arrow-right{
font-size: 12px;
margin: 4px;
}
.tip{
font-size: 12px;
color: rgba(35, 35, 35, 1);
}
img{
width: 28px;
height: 28px;
border-radius: 6px;
margin-right: 12px;
}
strong{
font-size: 16px;
color: rgba(35, 35, 35, 1);
font-weight: 700;
}
.label{
color: rgba(35, 35, 35, 0.8);
margin-right: 24px;
}
}
.table-supplier {
background: #ffffff;
border-radius: 4px;
padding: 16px;
.supdivider{
width: calc(100% + 32px);
margin-left: -16px;
margin-top: 8px;
margin-bottom: 16px;
}
::v-deep .head-form-new {
.ability-total {
display: none !important;
}
.from-item .normal-search-container{
white-space: nowrap;
width: 134px;
}
}
input {
border: 1px solid #efefef;
}
::v-deep .el-form-item {
margin-right: 8px !important;
}
.query-box {
margin: 10px 0 20px;
}
.cell-span {
display: inline-block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
cursor: pointer;
> span {
display: inline-block;
width: 37px;
position: absolute;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 1;
}
}
@import "@/assets/styles/search-common.scss";
}
.table-supplier2{
padding-top: 0;
margin-top: 0;
}
</style>
......@@ -25,8 +25,7 @@
<skeleton v-if="isSkeleton"></skeleton>
<div class="table-item-jf table-item" v-if="!isSkeleton&&tableData.length>0">
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
v-sticky-header.always="{offsetTop : '-16px',offsetBottom : '-15px'}" class="table-item1 fixed-table" border highlight-current-row
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" class="table-item1 fixed-table" border highlight-current-row
:header-row-class-name="setHeaderRow" :cell-class-name="setCellClass" :row-class-name="setRowClass" :header-cell-class-name="setCellClass"
ref="theOwnerListTable" :row-key="'customerKey'">
......@@ -44,7 +43,7 @@
<el-table-column label="创建时间" prop="name6" :fixed="tableColumnFixed" :resizable="false"></el-table-column>
<el-table-column label="生效时间" prop="name6" :fixed="tableColumnFixed" :resizable="false"></el-table-column>
<el-table-column label="操作" width="90" fixed="right">
<el-table-column label="操作" width="90">
<template slot-scope="scope">
<span style="color: #0081FF;cursor: pointer;" @click="viewDetail(scope.row)">详情</span>
</template>
......@@ -309,4 +308,3 @@
margin-top: 0;
}
</style>
\ No newline at end of file
......@@ -85,6 +85,7 @@
<!--<div class="p2">建议调整关键词或筛选条件,重新搜索</div>-->
<div class="empty-btn">
<span class="add" @click="addEnterprise">添加企业</span>
<span class="add" @click="addDefault" style="width: 110px;">添加默认监控</span>
<span class="add1" @click="handleBatch">批量监控</span>
</div>
</div>
......
......@@ -11,12 +11,12 @@
<el-row>
<el-col :span="8">
<el-form-item label="劳务队长名称" label-width="90px" class="i">
<el-input v-model="formdata.supplierName" placeholder="请输入劳务队长名称" clearable></el-input>
<el-input v-model="formdata.leaderName" placeholder="请输入劳务队长名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="挂靠单位" label-width="90px" class="i">
<el-input v-model="formdata.supplierName" placeholder="请输入挂靠单位名称" clearable></el-input>
<el-input v-model="formdata.customerName" placeholder="请输入挂靠单位名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -63,24 +63,25 @@
</el-table-column>
<el-table-column label="劳务队长名称" :fixed="tableColumnFixed" width="150" :resizable="false">
<template slot-scope="scope">
{{scope.row.name||"--"}}
<span v-html="scope.row.leaderName||'--'"></span>
</template>
</el-table-column>
<el-table-column label="身份证号" :fixed="tableColumnFixed" min-width="150" :resizable="false">
<template slot-scope="scope">
{{scope.row.IDCard||"--"}}
{{scope.row.laborCaptainIdCard||"--"}}
</template>
</el-table-column>
<el-table-column label="联系电话" min-width="150">
<template slot-scope="scope">
{{scope.row.telephone||"--"}}
{{scope.row.laborCaptainPhone||"--"}}
</template>
</el-table-column>
<el-table-column label="挂靠单位" min-width="280" :resizable="false">
<template slot-scope="scope">
<div class="wrap2">{{scope.row.unit||"--"}}</div>
<router-link v-if="scope.row.customerCid" :to="`/enterprise/${encodeStr(scope.row.customerCid)}?companyName=${scope.row.customerName}`" tag="a"
class="wordprimary" v-html="scope.row.customerName"></router-link>
<span v-else v-html="scope.row.customerName"></span>
</template>
</el-table-column>
<el-table-column label="不良事由" min-width="120" :resizable="false">
......@@ -90,12 +91,17 @@
</el-table-column>
<el-table-column label="不良行为情形" min-width="280" :resizable="false">
<template slot-scope="scope">
{{scope.row.blxw||"--"}}
{{scope.row.badReason||"--"}}
</template>
</el-table-column>
<el-table-column label="添加人" min-width="150" :resizable="false">
<template slot-scope="scope">
{{scope.row.dataSource === 0 ?'自主添加':'系统添加'}}
</template>
</el-table-column>
<el-table-column label="发生日期" min-width="150" :resizable="false">
<template slot-scope="scope">
{{scope.row.date||"--"}}
{{scope.row.createTime||"--"}}
</template>
</el-table-column>
</el-table>
......@@ -108,27 +114,27 @@
</div>
<el-dialog :visible.sync="dialogVisible" width="480px" append-to-body class="dialogVisible" title="添加劳务供应商挂靠信息">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="addForm" label-width="127px">
<el-form-item label="劳务队长名称" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入劳务队长名称"></el-input>
<el-form-item label="劳务队长名称" prop="leaderName">
<el-input v-model="ruleForm.leaderName" placeholder="请输入劳务队长名称"></el-input>
</el-form-item>
<el-form-item label="身份证号码" prop="IDCard">
<el-input v-model="ruleForm.IDCard" placeholder="请输入劳务队长身份证号码"></el-input>
<el-form-item label="身份证号码" prop="laborCaptainIdCard">
<el-input v-model="ruleForm.laborCaptainIdCard" placeholder="请输入劳务队长身份证号码"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="telephone">
<el-input v-model="ruleForm.telephone" placeholder="请输入联系电话"></el-input>
<el-form-item label="联系电话" prop="laborCaptainPhone">
<el-input v-model="ruleForm.laborCaptainPhone" placeholder="请输入联系电话"></el-input>
</el-form-item>
<el-form-item label="挂靠单位" prop="unit">
<el-input v-model="ruleForm.unit" placeholder="请输入挂靠单位"></el-input>
<el-form-item label="挂靠单位" prop="customerName">
<el-input v-model="ruleForm.customerName" placeholder="请输入挂靠单位"></el-input>
</el-form-item>
<el-form-item label="不良事由">
<el-input v-model="ruleForm.blsy" placeholder="请输入不良事由类型"></el-input>
<el-input v-model="ruleForm.badReason" placeholder="请输入不良事由类型"></el-input>
</el-form-item>
<el-form-item label="不良行为具体情形">
<el-input type="textarea" v-model="ruleForm.blxw" placeholder="请输入不良行为具体情形"></el-input>
<el-input type="textarea" v-model="ruleForm.badBehaviorSituation" placeholder="请输入不良行为具体情形"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible=false">取消</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleAdd">添加</el-button>
</div>
</el-dialog>
......@@ -141,7 +147,7 @@
import "@/assets/styles/public.scss";
import "@/assets/styles/supplierlist.scss";
import skeleton from '@/views/project/projectList/component/skeleton';
import {getSupplierLimitedList} from '@/api/supplier/supplier';
import {addRiskRecord,queryRiskList} from '@/api/supplier/supplier';
export default {
name: 'affiliationRisk',
components:{skeleton},
......@@ -149,12 +155,12 @@
return{
encodeStr,
formdata:{
supplierName:'',
isGroupCase:'',
limitedStartTime:'',
limitedEndTime:'',
leaderName:'',
customerName:'',
endDate:'',
startDate:'',
times:[],
pageSize:50,
pageSize:20,
pageNum:1,
},
tableData:[
......@@ -197,52 +203,51 @@
},
rules: {
name: { required: true, message: '劳务队长名称为空', trigger: 'blur' }, // 限制必填
IDCard:{ required: true, message: '身份证号码不能为空', trigger: 'blur' }, // 限制必填
telephone:{ required: true, message: '联系电话不能为空', trigger: 'blur' }, // 限制必填
unit:{ required: true, message: '挂靠单位不能为空', trigger: 'blur' }, // 限制必填
leaderName: { required: true, message: '劳务队长名称为空', trigger: 'blur' }, // 限制必填
laborCaptainIdCard:{ required: true, message: '身份证号码不能为空', trigger: 'blur' }, // 限制必填
laborCaptainPhone:{ required: true, message: '联系电话不能为空', trigger: 'blur' }, // 限制必填
customerName:{ required: true, message: '挂靠单位不能为空', trigger: 'blur' }, // 限制必填
},
}
},
created() {
// this.searchList()
this.searchList()
},
methods:{
searchList(){
// this.isSkeleton = true
// let formdata = JSON.parse(JSON.stringify(this.formdata))
// if(formdata.times != [] &&formdata.times.length>1){
// formdata.limitedStartTime = formdata.times[0]
// formdata.limitedEndTime = formdata.times[1]
// }else{
// formdata.limitedStartTime = ''
// formdata.limitedEndTime = ''
// }
// delete formdata.times
// getSupplierLimitedList(formdata).then(res=>{
// this.isSkeleton = false
// if(res.code == 200) {
// this.total = res.total
// this.tableData = res.rows
// this.formdata.pageNum = res.currentPage
// }else{
// this.total = 0
// this.tableData = []
// this.formdata.pageNum = 1
// }
// })
this.isSkeleton = true
let formdata = JSON.parse(JSON.stringify(this.formdata))
if(formdata.times != [] &&formdata.times !=null){
formdata.startDate = formdata.times[0]
formdata.endDate = formdata.times[1]
}else{
formdata.startDate = ''
formdata.endDate = ''
}
delete formdata.times
queryRiskList(formdata).then(res=>{
this.isSkeleton = false
if(res.code == 200) {
this.total = res.total
this.tableData = res.rows
this.formdata.pageNum = res.currentPage
}else{
this.total = 0
this.tableData = []
this.formdata.pageNum = 1
}
})
},
clears(){
this.formdata={
supplierName:'',
isGroupCase:'',
limitedStartTime:'',
limitedEndTime:'',
times:[],
pageSize:50,
pageNum:1,
this.ruleForm={
leaderName:'',
laborCaptainIdCard:'',
laborCaptainPhone:'',
customerName:'',
badReason:'',
badBehaviorSituation:'',
}
// this.searchList()
this.searchList()
},
handleCurrentChange(val){
this.formdata.pageNum = val
......@@ -260,8 +265,32 @@
return "enterprise-name-row";
},
handleAdd(){
this.dialogVisible=false
let pram = {
...this.ruleForm,
dataSource:0
}
addRiskRecord(pram).then(res=>{
if(res.code == 200){
this.dialogVisible=false;
this.ruleForm={
leaderName:'',
laborCaptainIdCard:'',
laborCaptainPhone:'',
customerName:'',
badReason:'',
badBehaviorSituation:'',
}
this.$message({
message: '新增成功',
type: 'success'
});
this.searchList()
}
})
},
handleCancel(){
this.dialogVisible=false;
},
}
}
</script>
......
......@@ -88,6 +88,18 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="队长身份证">
<el-input v-model="formdata.laborCaptainIdCard" placeholder="请输入队长身份证"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="身份证查重">
<el-select v-model="isIdCardRepeat" placeholder="请选择" clearable>
<el-option label="是" value="是"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-form-item label=" ">
......@@ -100,6 +112,13 @@
<div class="table-supplier">
<div class="total-title">
<div class="totals">{{total}}</div>
<div class="btns">
<p class="total-dc" @click="customerExport">
<img src="@/assets/images/EXCEL.png" alt="">
<span class="excel">导出EXCEL</span>
</p>
<el-button type="primary" @click="addPro">添加劳务队队长</el-button>
</div>
</div>
<div class="table-item-jf table-item-jf1 empty-table" v-if="total == 0 && !isSkeleton">
<img class="item-jf-img" src="@/assets/images/kong.png" alt="">
......@@ -326,6 +345,50 @@
</el-table>
</div>
</el-dialog>
<!--添加劳务队队长-->
<el-dialog
:close-on-click-modal="false"
class="new-dialog"
:visible.sync="dialogVisible"
title="劳务队长信息"
width="500px">
<el-form class="popform" label-width="160px" :model="queryParam" :rules="rules" ref="ruleForm">
<el-form-item label="所属供应商企业" class="row" prop="cusomerName">
<el-input type="text" placeholder="请输入所属供应商企业" @input="inputEnterpriseName" v-model="queryParam.cusomerName"></el-input>
<div class="enterpriseList" v-if="enterpriseList.length > 0">
<p @click="blurEnterpriseName(item)" v-for="item in enterpriseList">
<el-tooltip placement="top" v-if="item.name.length>26">
<div slot="content" v-html="item.name"></div>
<span v-html="item.name"></span>
</el-tooltip>
<span v-else v-html="item.name"></span>
</p>
</div>
</el-form-item>
<el-form-item label="企业统一社会信用代码" class="row">
<el-input type="text" placeholder="请输入企业统一社会信用代码" v-model="queryParam.unifySocialCode"></el-input>
</el-form-item>
<el-form-item label="劳务队长姓名" class="row" prop="leaderName">
<el-input type="text" placeholder="请输入劳务队长姓名" v-model="queryParam.leaderName"></el-input>
</el-form-item>
<el-form-item label="劳务队长身份证号码" class="row" prop="laborCaptainIdcard" :style="tip ?'margin-bottom:0px;':'margin-bottom:16px;'">
<el-input type="text" placeholder="请输入劳务队长身份证号码" @input="inputLaborLeaderId" v-model="queryParam.laborCaptainIdcard"></el-input>
<p class="tip" v-if="tip" style="color:#ff4949;">该身份证号已归属其他供应商企业。<span style="color:#0081FF;cursor: pointer;" @click="handleClick">查看异常</span></p>
</el-form-item>
<el-form-item label="联系电话" class="row" prop="laborCaptainPhone">
<el-input type="text" placeholder="请输入联系电话" v-model="queryParam.laborCaptainPhone"></el-input>
</el-form-item>
<el-form-item label="队伍规模" class="row">
<el-input type="text" placeholder="请输入队伍规模" v-model="queryParam.serviceTeamPersonnum"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancel">关闭</el-button>
<el-button type="primary" @click="handleAdd">添加</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -334,7 +397,7 @@
import '@/assets/styles/public.scss'
import '@/assets/styles/supplierlist.scss'
import skeleton from '@/views/project/projectList/component/skeleton'
import { areaAll, bizDictData, custmerInfolist } from '@/api/supplier/supplier'
import { areaAll, bizDictData, custmerInfolist,companyList,getLborLeaderId,addLaborLeader,exportCustomerList } from '@/api/supplier/supplier'
import { getDicts } from '@/api/system/dict/data'
import {queryConditionFiltering} from '@/utils/index'
export default {
......@@ -380,6 +443,7 @@
registerCity:[],
approveDate2Start:null,
approveDate2End:null,
laborCaptainIdCard:null,
},
tableData:[],
isSkeleton:false,
......@@ -388,8 +452,30 @@
tableColumnFixed: true,
fbsvisib:false,
fbsisSkeleton:false,
dialogVisible:false,
queryParam:{
cusomerName:''
},
rules:{
cusomerName:[{ required: true, message: '请输入所属供应商企业!', trigger: 'blur' },],
laborCaptainIdcard:[{ required: true, message: '请输入劳务队长身份证号码', trigger: 'blur' },],
leaderName:[{ required: true, message: '请输入劳务队长姓名', trigger: 'blur' },],
laborCaptainPhone:[{ required: true, message: '请输入联系电话', trigger: 'blur' },],
},
enterpriseList:[],
tip:false,
isIdCardRepeat:'',
}
},
watch: {
dialogVisible: {
handler(newValue) {
if(!newValue){
this.enterpriseList=[]
}
}
},
},
created() {
this.init()
this.cusoomerInfolist()
......@@ -483,6 +569,11 @@
param.registerProvince = []
param.registerCity = []
}
if(this.isIdCardRepeat === '是'){
param.isIdCardRepeat=true
}else {
delete param.isIdCardRepeat
}
custmerInfolist(queryConditionFiltering(this.formdata)).then(res=>{
this.isSkeleton = false
this.tableData = res.rows
......@@ -520,10 +611,228 @@
goAssessment(row){
this.$tab.openPage(row.customerName+'-供应商考评', '/supplier/supplierlist/assessment')
},
addPro(){
this.dialogVisible=true;
},
customerExport(){
let param = this.formdata;
param.customerClass='劳务分包队伍'
if(param.times){
param.approveDate2Start = param.times[0]
param.approveDate2End = param.times[1]
}else{
param.approveDate2Start = ''
param.approveDate2End = ''
}
param.groupSpecialtyId = []
if(param.groupSpecialtys){
param.groupSpecialtys.forEach(item=>{
param.groupSpecialtyId.push(item[item.length-1])
})
}
if(param.areas){
let province = []
let city = []
param.areas.forEach(item=>{
if(item.length == 3){//到市
if(item[1].indexOf('重庆')>-1||item[1].indexOf('北京')>-1||item[1].indexOf('天津')>-1||item[1].indexOf('上海')>-1){
province.push(item[1])
}else{
city.push(item[2])
}
}
})
param.registerProvince = province
param.registerCity = city
}else{
param.registerProvince = []
param.registerCity = []
}
if(this.isIdCardRepeat === '是'){
param.isIdCardRepeat=true
}else {
delete param.isIdCardRepeat
}
delete param.pageNum
delete param.pageSize
exportCustomerList(param).then(blob => {
this.$download.saveAs(blob, `劳务分包队伍.xlsx`)
})
},
//模糊查询
inputEnterpriseName(){
if(this.queryParam.cusomerName.length === 0){
this.enterpriseList=[]
return
}
let pram = {
keyword:this.queryParam.cusomerName,
page:{page: 1, limit: 20}
}
companyList(pram).then(res=>{
if(res.code == 200){
this.enterpriseList=res.data.list;
}else{
}
})
},
inputLaborLeaderId(){
getLborLeaderId(this.queryParam.laborCaptainIdcard).then(res=>{
if(res.code == 200){
if(res.data){
this.tip=true;
this.tableDataList=res.data;
}else {
this.tip=false;
this.tableDataList=[];
}
}
})
},
handleClick(){
this.dialogVisible=false;
this.tip=false;
this.tableDataList=[];
this.tableData = this.tableDataList;
this.tableData.forEach(item=>{
item.customerText = item.customerName.replace(/<\/?[^>]+(style=('|")[^'"]*)?>/gi, '')
})
this.queryParam={
cusomerName:'',
unifySocialCode:'',
leaderName:'',
laborCaptainIdcard:'',
laborCaptainPhone:'',
serviceTeamPersonnum:'',
}
},
blurEnterpriseName(item){
this.queryParam.unifySocialCode=item.creditCode
this.queryParam.cusomerName=item.name.replace(/<[^>]+>/g,'');
this.enterpriseList=[]
},
handleAdd(){
let pram = {
...this.queryParam
}
pram.serviceTeamPersonnum=Number(pram.serviceTeamPersonnum);
if(this.tip){
pram.badReason='挂靠风险';
pram.badBehaviorSituation=this.queryParam.leaderName+'已存在'+this.queryParam.cusomerName+',存在挂靠风险';
pram.dataSource=1
}else {
delete pram.badReason
delete pram.badBehaviorSituation
}
addLaborLeader(pram).then(res=>{
if(res.code == 200){
this.dialogVisible=false;
this.tip=false;
this.cusoomerInfolist();
this.$message({
message: '新增成功',
type: 'success'
});
this.queryParam={
cusomerName:'',
unifySocialCode:'',
leaderName:'',
laborCaptainIdcard:'',
laborCaptainPhone:'',
serviceTeamPersonnum:'',
}
}
})
},
handleCancel(){
this.dialogVisible=false;
this.tip=false;
this.queryParam={
cusomerName:'',
unifySocialCode:'',
leaderName:'',
laborCaptainIdcard:'',
laborCaptainPhone:'',
serviceTeamPersonnum:'',
}
},
}
}
</script>
<style scoped lang="scss">
.supplier{
.total-title{
height: 36px;
line-height: 36px;
.btns{
float: right;
display: inline-block;
text-align: right;
::v-depp .el-button--medium{
padding: 10px;
}
.total-dc {
cursor: pointer;
margin-right: 16px;
float: left;
img {
width: 18px;
margin-right: 6px;
margin-top: -4px;
}
color: rgba(35, 35, 35, 0.8);
}
}
}
::v-deep .new-dialog {
.el-dialog__header{
border-bottom: 1px solid #eee;
}
.el-dialog__footer{
border-top: 1px solid #eee;
padding-top:20px;
}
.el-dialog__body {
padding: 20px 20px 0 20px;
}
.el-form-item {
margin-bottom: 16px;
}
.enterpriseList{
width: 300px;
height: 176px;
border-radius: 4px;
background: #ffffff;
position: absolute;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.12);
border: 1px solid #E4E7ED;
z-index: 9;
top:40px;
padding-top: 8px;
overflow: auto;
cursor: pointer;
p{
height: 32px;
line-height: 32px;
color:#232323;
font-size: 14px;
padding-left: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
p:hover{
background: #F5F7FA;
}
}
}
}
</style>
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