@ -13,31 +13,20 @@
< / e l - f o r m - i t e m >
< el -form -item label = "项目类型" >
< el -select v-model ="listQuery.params.projectType" placeholder="请选择" >
< el -option
v - for = "(item,i) in ProjectTypeList"
: key = "i"
: label = "item.projectType"
< el -option v -for = " ( item , i ) in ProjectTypeList " :key ="i" :label ="item.projectType"
: value = "item.projectType" >
< / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item label = "贷款行" >
< el -select v-model ="listQuery.params.bankSid" placeholder="请选择" >
< el -option
v - for = "(item,i) in storehouseList"
: key = "i"
: label = "item.name"
: value = "item.sid" >
< el -option v-for ="(item,i) in storehouseList" :key="i" :label="item.name" :value="item.sid" >
< / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item label = "项目状态" >
< el -select v-model ="listQuery.params.stateName" placeholder="请选择" @change="getState" >
< el -option
v - for = "(item,i) in stateList"
: key = "i"
: label = "item.name"
: value = "item.sid" >
< el -option v-for ="(item,i) in stateList" :key="i" :label="item.name" :value="item.sid" >
< / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
@ -57,12 +46,14 @@
< el -table v-loading ="listLoading" :data="list" border style="width: 100%;" :row-style="{height: '40px'}" >
<!-- < el -table -column type = "selection" align = "center" width = "50" / > -- >
< el -table -column label = "序号" type = "index" width = "80" :index ="indexMethod" align = "center" / >
<!-- < el -table -column label = "操作" wid align = "center" width = "18 0" >
< el -table -column label = "操作" wid align = "center" width = "40 0" >
< template slot -scope = " scope " >
< el -button type = "primary" size = "mini" @click ="toDetail(scope.row)" > 查看 < / el -button >
< el -button type = "primary" size = "mini" @click ="toEdit(scope.row)" > 编辑 < / el -button >
< el -button type = "primary" size = "mini" @click ="toProjectProgress(scope.row)" > 项目进度 < / el -button >
< el -button type = "primary" size = "mini" @click ="toCreditLimit(scope.row)" > 用还信 < / el -button >
< el -button type = "primary" size = "mini" @click ="toReport(scope.row)" > 项目报告 < / el -button >
< el -button type = "primary" size = "mini" @click ="toTieUp(scope.row)" > 关联商享通仓库 < / el -button >
< / template >
< / e l - t a b l e - c o l u m n > - - >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "项目名称" prop = "entryName" width = "250" align = "center" / >
< el -table -column label = "所属行业" prop = "industryName" width = "120" align = "center" / >
< el -table -column label = "项目类型" prop = "typeName" width = "120" align = "center" / >
@ -86,6 +77,188 @@
< / div >
<!-- < projectAdd v -show = " viewState = = 2 | | viewState = = 3 " ref = "divAdd" @doback ="resetState" @reloadlist ="getList" / > -- >
<!-- < projectInfo v -show = " viewState = = 4 " ref = "divInfo" @doback ="resetState" @reloadlist ="getList" / > -- >
< el -dialog title = "项目进度" :close-on-click-modal ="false" :visible.sync ="dialogShow" width = "15%"
: before - close = "dialogClose" >
< el -select v -model = " projectState.nodeValue " placeholder = "项目进度" style = "margin-top: -30px;"
@ change = "seleProjectState" >
< el -option v-for ="item in options" :key="item.nodeKey" :label="item.nodeValue" :value="item.nodeKey" >
< / e l - o p t i o n >
< / e l - s e l e c t >
< span slot = "footer" class = "dialog-footer" >
< el -button @click ="dialogClose" > 取 消 < / el -button >
< el -button type = "primary" @click ="saveProjectState()" > 保 存 < / el -button >
< / span >
< / e l - d i a l o g >
< el -dialog title = "用还信" :close-on-click-modal ="false" :visible.sync ="dialogShow2" width = "60%"
: before - close = "dialogClose2" >
< el -form ref = "form_daily" :model ="formobj" label -position = " right " class = "formadd" style = "margin-top: -30px;" >
< el -row class = "first_row" >
< el -col :span ="4" class = "tleftb2" >
< span > 项目名称 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item >
< span > { { formobj . projectname } } < / span >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="4" class = "tleftb2" >
< span > 填报日期 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item > < el -date -picker v -model = " formobj.tbdate " type = "date" style = "width: 100%;" placeholder = "选择日期"
value - format = "yyyy-MM-dd" / > < / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="4" class = "tleftb2" >
< span > 类型 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item >
< el -radio -group v-model ="radio" @change="radioChange" >
< el -radio :label ="1" > 用信 < / e l - r a d i o >
< el -radio :label ="2" > 还信 < / e l - r a d i o >
< / e l - r a d i o - g r o u p >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="4" class = "tleftb2" >
< span > 金额 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item >
< el -form -item > < el -input v -model = " formobj.money " placeholder = "请输入金额" style = "width:100%" class = "addinputw"
oninput = "value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')"
clearable / > < / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="4" class = "tleftb2" >
< span > 附件 < / span >
< / e l - c o l >
< el -col :span ="20" class = "trightb" >
< el -form -item >
< upload style = "margin-top: 10px;" ref = "uploadImg2" v -model = " imgList " :limit ="9" @change ="backData"
bucket = "map" : upload - data = "{ type: '0001' }" > < / upload >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="4" class = "tleftb2" >
< span > 备注 < / span >
< / e l - c o l >
< el -col :span ="20" class = "trightb" >
< el -form -item > < el -input v -model = " formobj.remarks " placeholder = "请输入备注" style = "width:100%" class = "addinputw"
clearable / > < / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< / e l - f o r m >
< span slot = "footer" class = "dialog-footer" >
< el -button @click ="dialogClose2" > 取 消 < / el -button >
< el -button type = "primary" @click ="saveFormobj()" > 保 存 < / el -button >
< / span >
< / e l - d i a l o g >
< el -dialog title = "项目报告" :close-on-click-modal ="false" :visible.sync ="dialogShow3" width = "60%"
: before - close = "dialogClose3" >
< el -form ref = "form_daily" label -position = " right " class = "formadd" style = "margin-top: -30px;" >
< el -row class = "first_row" >
< el -col :span ="4" class = "tleftb2" style = "padding-bottom: 10px;padding-top: 10px;" >
< span > 报告类型 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item style = "padding-bottom: 10px;padding-top: 10px;" >
< el -select v-model ="reportInfo.typeValue" placeholder="报告类型" @change="seleReportType" >
< el -option v-for ="item in options" :key="item.nodeKey" :label="item.nodeValue" :value="item.nodeKey" >
< / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="4" class = "tleftb2" style = "padding-bottom: 10px;padding-top: 10px;" >
< span > 上传报告 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item style = "padding-bottom: 10px;padding-top: 10px;" >
< el -upload class = "upload-demo" :action ="updateAction" :on-success ="handleSuccess"
: on - remove = "handleRemove" : file - list = "uploadFileList" >
< el -button size = "small" type = "primary" v-show ="reportInfo.typeKey!=''" > 点击上传报告 < / el -button >
< / e l - u p l o a d >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
<!-- < el -row >
< el -col :span ="4" class = "tleftb2" style = "padding-bottom: 10px;padding-top: 10px;" >
< span > 竣工报告 < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item style = "padding-bottom: 10px;padding-top: 10px;" >
< el -upload class = "upload-demo" :action ="updateAction" :on-success ="handleSuccess3"
: on - remove = "handleRemove3" : file - list = "uploadFileList3" >
< el -button size = "small" type = "primary" > 点击上传报告 < / e l - b u t t o n >
< / e l - u p l o a d >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="4" class = "tleftb2" >
< span > < / span >
< / e l - c o l >
< el -col :span ="8" class = "trightb" >
< el -form -item > < / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w > - - >
< / e l - f o r m >
< span slot = "footer" class = "dialog-footer" >
< el -button @click ="dialogClose3" > 取 消 < / el -button >
< el -button type = "primary" @click ="saveReport()" > 保 存 < / el -button >
< / span >
< / e l - d i a l o g >
< el -dialog title = "关联仓库" :close-on-click-modal ="false" :visible.sync ="dialogShow4" width = "60%"
: before - close = "dialogClose4" >
< div class = "step2Item" style = "margin-top: -30px;" >
< el -select v-model ="warehouseName" class="addinputw" placeholder="请选择仓库" style="width:20%" @change="getCangku" >
< el -option v -for = " item in seleWarehouseList " :label ="item.warehouseName" :value ="item.sid" / >
< / e l - s e l e c t >
< el -button type = "primary" style = "margin-left: 20px;" @click ="addCangku()" > 添加 < / el -button >
< / div >
< el -table :data ="tieUpWarehouses.warehouse" border style = "width: 98%;margin-left: 15px;margin-top: 10px;" >
<!-- < el -table -column type = "selection" align = "center" width = "50" / > -- >
< el -table -column label = "操作" wid align = "center" width = "116" >
< template slot -scope = " scope " >
< el -button type = "primary" size = "mini" @click ="doDel(scope.$index)" > 删除 < / el -button >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "仓库名称" prop = "name" width = "400" align = "center" / >
< el -table -column label = "仓库地址" prop = "address" align = "center" / >
< el -table -column label = "联系人" prop = "linkerName" width = "120" align = "center" / >
< el -table -column label = "联系电话" prop = "linkerPhone" width = "150" align = "center" / >
< / e l - t a b l e >
< / e l - f o r m >
< span slot = "footer" class = "dialog-footer" >
< el -button @click ="dialogClose4" > 取 消 < / el -button >
< el -button type = "primary" @click ="saveSxtWarehouses()" > 保 存 < / el -button >
< / span >
< / e l - d i a l o g >
< / div >
< / template >
@ -96,12 +269,14 @@
import ButtonBar from '@/components/ButtonBar'
/ / i m p o r t p r o j e c t A d d f r o m ' . / p r o j e c t A d d 2 . v u e '
/ / i m p o r t p r o j e c t I n f o f r o m ' . / p r o j e c t I n f o 2 . v u e '
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
export default {
name : 'CustomerManagement' ,
components : {
Pagination ,
pageye ,
ButtonBar ,
upload
/ / p r o j e c t A d d ,
/ / p r o j e c t I n f o ,
@ -146,6 +321,44 @@
storehouseList : [ ] ,
ProjectTypeList : [ ] ,
stateList : [ ] ,
dialogShow : false ,
dialogShow2 : false ,
dialogShow3 : false ,
dialogShow4 : false ,
options : [ ] ,
projectState : {
sid : "" ,
nodeKey : "" ,
nodeValue : ""
} ,
radio : 1 ,
formobj : {
usersid : window . sessionStorage . getItem ( 'userSid' ) ,
projectname : "" ,
projectsid : "" ,
tbdate : "" ,
type : 1 ,
money : "" ,
pzfiles : [ ] ,
remarks : ""
} ,
imgList : [ ] ,
updateAction : process . env . VUE_APP_BASE_API + '/projectdaily/uploadfile' ,
uploadFileList : [ ] ,
reportFileList : [ ] ,
warehouseName : '' ,
cangKu : { } ,
seleWarehouseList : [ ] ,
tieUpWarehouses : {
sid : "" ,
warehouse : [ ]
} ,
reportInfo : {
mainsid : "" ,
typeKey : '' ,
typeValue : '' ,
reportList : [ ] ,
} ,
}
} ,
mounted ( ) {
@ -156,6 +369,249 @@
/ / 加 载 列 表
} ,
methods : {
seleProjectState ( val ) {
const choose = this . options . filter ( ( item ) => item . nodeKey == val )
console . log ( '>>>>>>>>>seleProjectState' , choose )
this . projectState . nodeValue = choose [ 0 ] . nodeValue
this . projectState . nodeKey = choose [ 0 ] . nodeKey
} ,
toProjectProgress ( row ) {
this . projectState = {
sid : row . sid ,
nodeKey : row . nodeKey ,
nodeValue : row . nodeValue
}
req . getNodeByProjectSid ( {
projectSid : row . sid
} ) . then ( ( res ) => {
console . log ( ">>>>>>>>>getNodeByProjectSid" , res . data )
this . options = res . data
this . dialogShow = true
} )
} ,
dialogClose ( ) {
console . log ( ">>>>>>>>>dialogClose" , this . projectState )
this . projectState = {
sid : "" ,
nodeKey : "" ,
nodeValue : ""
}
this . dialogShow = false
} ,
saveProjectState ( ) {
req . updatePhase ( this . projectState ) . then ( ( res ) => {
console . log ( ">>>>>>>>>updatePhase" , res . data )
this . dialogShow = false
} )
} ,
toCreditLimit ( row ) {
this . formobj . projectsid = row . sid
this . formobj . projectname = row . entryName
this . dialogShow2 = true
} ,
dialogClose2 ( ) {
console . log ( "formobj" , this . formobj )
this . dialogShow2 = false
} ,
radioChange ( val ) {
console . log ( "radioChange" , val )
this . formobj . type = val
} ,
backData ( value ) {
console . log ( value , 999 )
console . log ( "imgList" , this . imgList )
const aa = [ ]
if ( value . length > 0 && value != null && value != undefined ) {
for ( var i = 0 ; i < value . length ; i ++ ) {
aa . push ( value [ i ] . url )
}
}
this . formobj . pzfiles = aa
} ,
saveFormobj ( ) {
console . log ( "formobj" , this . formobj )
req . saveCreditRecord ( this . formobj ) . then ( ( res ) => {
console . log ( ">>>>>>>>>saveCreditRecord" , res . data )
this . dialogShow2 = false
this . imgList = [ ]
this . formobj = {
usersid : window . sessionStorage . getItem ( 'userSid' ) ,
projectname : "" ,
projectsid : "" ,
tbdate : "" ,
type : 1 ,
money : "" ,
pzfiles : [ ] ,
remarks : ""
}
} )
} ,
toReport ( row ) {
this . reportInfo . mainsid = row . sid
req . getNodeByProjectSid ( {
projectSid : row . sid
} ) . then ( ( res ) => {
console . log ( ">>>>>>>>>getNodeByProjectSid" , res . data )
this . options = res . data
this . dialogShow3 = true
} )
} ,
seleReportType ( val ) {
console . log ( ">>>>>>>>>seleReportType1111" , val )
const choose = this . options . filter ( ( item ) => item . nodeKey == val )
console . log ( '>>>>>>>>>seleReportType' , choose )
this . reportInfo . typeKey = choose [ 0 ] . nodeKey
this . reportInfo . typeValue = choose [ 0 ] . nodeValue
} ,
dialogClose3 ( ) {
this . dialogShow3 = false
} ,
saveReport ( ) {
var fileTypeName = ''
if ( this . reportInfo . typeValue == '在途' ) {
fileTypeName = "到货验收报告"
}
if ( this . reportInfo . typeValue == '在建' ) {
fileTypeName = "在建查验报告"
}
if ( this . reportInfo . typeValue == '竣工' ) {
fileTypeName = "竣工报告"
}
for ( var i = 0 ; i < this . reportFileList . length ; i ++ ) {
var item = {
url : this . reportFileList [ i ] . fullUrl ,
absolutePath : this . reportFileList [ i ] . filePath ,
name : fileTypeName ,
fileSrcName : this . reportFileList [ i ] . fileSrcName ,
}
this . reportInfo . reportList . push ( item )
}
console . log ( 'saveReport' , this . reportInfo )
req . saveProjectReport ( this . reportInfo ) . then ( ( res ) => {
this . uploadFileList = [ ]
this . reportFileList = [ ]
this . reportInfo . reportList = [ ]
this . dialogShow3 = false
} )
} ,
handleSuccess ( resp , file , fileList ) {
console . log ( 'handleSuccess----' , resp )
const _this = this
const upfile = {
fileTypeId : 6 , / / ' 文 件 类 型 : 1 = 帐 户 余 额 ; 2 = 应 收 账 款 ; 3 = 库 存 货 值 ; 4 = 在 途 货 值 ; 5 = 预 付 款 ; ' ,
fileTypeName : '项目报告' , / / ' 文 件 类 型 名 : 1 = 帐 户 余 额 ; 2 = 应 收 账 款 ; 3 = 库 存 货 值 ; 4 = 在 途 货 值 ; 5 = 预 付 款 ' ,
fileSrcName : resp . data . sourceFileName , / / ' 原 文 件 名 ' ,
filePath : resp . data . filePath , / / ' 文 件 的 相 对 路 径 ' ,
fullUrl : resp . data . fullUrl , / / ' 文 件 完 整 的 访 问 U R L ' ,
fileuid : file . uid / / ' 文 件 完 整 的 访 问 U R L ' ,
}
_this . reportFileList . push ( upfile )
} ,
handleRemove ( file , fileList ) {
const _this = this
let delete_index = 0
for ( let i = 0 , len = _this . reportFileList . length ; i < len ; i ++ ) {
if ( file . uid === _this . reportFileList [ i ] . fileuid ) {
delete_index = i
break
}
}
_this . reportFileList . splice ( delete_index , 1 )
} ,
getSxtWarehouses ( sid ) {
req . getSxtWarehouses ( {
sid : sid
} ) . then ( ( res ) => {
console . log ( ">>>>>>>>>getSxtWarehouses" , res . data )
this . seleWarehouseList = res . data
} )
} ,
toTieUp ( row ) {
this . tieUpWarehouses . sid = row . sid
req . initProjectWarehouses ( row . sid ) . then ( ( res ) => {
console . log ( ">>>>>>>>>initProjectWarehouses" , res . data )
this . tieUpWarehouses . warehouse = res . data . warehouse
this . dialogShow4 = true
} )
this . getSxtWarehouses ( row . sid )
} ,
getCangku ( value ) {
const choose = this . seleWarehouseList . filter ( ( item ) => item . sid === value )
this . cangKu . name = choose [ 0 ] . warehouseName
this . cangKu . shSid = choose [ 0 ] . sid
this . cangKu . address = choose [ 0 ] . address
this . cangKu . linkerName = choose [ 0 ] . contacts
this . cangKu . linkerPhone = choose [ 0 ] . mob
} ,
addCangku ( ) {
console . log ( ">>>>>>>>>addCangku" , this . cangKu )
console . log ( ">>>>>>>>>addCangku" , this . tieUpWarehouses . warehouse )
var info = {
shSid : this . cangKu . shSid ,
name : this . cangKu . name ,
address : this . cangKu . address ,
linkerName : this . cangKu . linkerName ,
linkerPhone : this . cangKu . linkerPhone ,
}
const choose = this . tieUpWarehouses . warehouse . filter ( ( item ) => item . shSid === info . shSid )
console . log ( ">>>>>>>>>addCangku" , choose )
if ( choose . length == 0 )
this . tieUpWarehouses . warehouse . push ( info )
else
this . $message ( {
showClose : true ,
type : 'error' ,
message : "请勿重复添加!"
} )
} ,
doDel ( index ) {
this . tieUpWarehouses . warehouse . splice ( index , 1 )
} ,
dialogClose4 ( ) {
this . dialogShow4 = false
} ,
saveSxtWarehouses ( ) {
req . saveSxtWarehouses ( this . tieUpWarehouses ) . then ( ( res ) => {
console . log ( ">>>>>>>>>saveSxtWarehouses" , res . data )
this . dialogShow4 = false
this . warehouseName = ''
} )
} ,
getState ( value ) {
console . log ( ">>>>>>>>>getState" , value )
const choose = this . stateList . filter ( ( item ) => item . sid === value )
@ -262,7 +718,7 @@
this . $refs [ 'divAdd' ] . showEdit ( row )
} ,
/ / 根 据 本 行 I D 删 除 数 据
doDel ( row ) {
doDelss ( row ) {
const tip = '请确认是否删除所选记录?'
this . $confirm ( tip , '提示' , {
confirmButtonText : '确定' ,
@ -311,4 +767,57 @@
}
< / script >
< style scoped >
. wenjiantit {
font - size : 16 px ;
font - weight : bold ;
margin : 25 px 0 10 px 0 ;
}
. forminfo {
margin : 0 ;
padding : 0 ;
}
. listcon {
height : calc ( 100 vh - 250 px ) ;
overflow - y : auto ;
overflow - x : hidden ;
}
. tleftb2 {
text - align : center ;
font - size : 14 px ;
color : # 606266 ;
line - height : 40 px ! important ;
font - weight : 600 ;
}
. tleftb3 {
display : flex ;
height : 100 % ;
flex - direction : row ;
align - items : center ;
justify - content : center ;
text - align : center ;
font - size : 14 px ;
color : # 666666 ;
}
. step2Item {
display : flex ;
flex - direction : row ;
align - items : center ;
margin - left : 20 px ;
padding - top : 15 px ;
padding - bottom : 15 px ;
}
. step2ItemBtn {
margin - left : 20 px ;
color : # fff ;
background - color : # 0294 D7 ;
padding : 5 px 15 px ;
border - radius : 5 px ;
}
< / style >