@@ -20,15 +20,20 @@
< span > 合同号 : < / span >
< el-input v-model = "contractNum" placeholder="合同号" size="small" style="width:180px" clearable / >
< span > 采购员 : < / span >
< el-select v-model = "personValue" placeholder="采购员" size="small" style="width: 100px" clearable >
< el-option
v-for = "item in person"
:key = "item.value"
:label = "item.label"
:value = "item.value" / >
< / el-select >
< span > 供应商 : < / span >
< el-input
v-model = "buy erName"
placeholder = "请双击选择 "
v-model = "suppli erName"
placeholder = "供应商 "
size = "small"
clearable
style = "width:12 0px"
@dblclick.native ="initBuyer();dialogVisible2=true;submitDisable=true" />
< span > 供应商 : < / span >
< el-input v-model = "supplierName" placeholder="供应商" size="small" clearable / >
style = "width:18 0px" / >
< el-button
type = "success"
size = "small"
@@ -38,28 +43,37 @@
< / el-card >
< el-card >
< el-table v-loading = "loading1" :data= "tableData1" size= "mini" border style= "width: 100%; ">
< el -table -column label = "采购合同编号 " min -width = " 15 0" align = "center" >
< el-table :data = "tableData1" size= "mini" border style= "width: 100%">
< el-table-column label = "请款 " min -width = " 8 0" align = "center" >
< template slot -scope = " scope " >
< el-button
type = "primary"
size = "mini"
icon = ""
@click ="requestFund(scope.row)" > 请款 < / el -button >
< / template >
< / el-table-column >
< el-table-column label = "采购合同编号" min -width = " 100 " align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 采购合同编号 } }
< / template >
< / el-table-column >
< el-table-column label = "采购合同名称" min -width = " 15 0 " align = "center" >
< el-table-column label = "采购合同名称" min -width = " 10 0 " align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 采购合同名称 } }
< / template >
< / el-table-column >
< el-table-column label = "规定到货时间" width = "100" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 规定到货时间 } }
{ { scope . row . 规定到货时间 . split ( ' ' ) [ 0 ] } }
< / template >
< / el-table-column >
< el-table-column label = "供应商" min -width = " 20 0" align = "center" >
< el-table-column label = "供应商" min -width = " 15 0" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 供应商名称 } }
< / template >
< / el-table-column >
< el-table-column label = "总金额" width = "8 0" align = "center" >
< el-table-column label = "总金额" width = "7 0" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 总金额 } }
< / template >
@@ -69,7 +83,7 @@
{ { scope . row . 付款方式内容 } }
< / template >
< / el-table-column >
< el-table-column label = "欠款金额" min -width = " 10 0" align = "center" >
< el-table-column label = "欠款金额" min -width = " 7 0" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 欠款金额 } }
< / template >
@@ -84,9 +98,18 @@
< el-input v-model = "scope.row.本次应请款" size="mini" style="width:70px" />
< / template >
< / el -table -column >
< el-table-column label = "请款付款情况" width = "81 0" align = "center" >
< el-table-column label = "请款付款情况" width = "90 0" align = "center" >
< template slot -scope = " scope " >
< el-table v-show = "tableData11[scope.$index].length!==0" :data= "tableData11[scope.$index]" size= "mini" border style= "width: 100%;">
< el-table :id = "scope.$index" :data = "tableData11[scope.$index]" size= "mini" border style= "width: 100%;" >
< el-table-column label = "取消请款" width = "100" align = "center" >
< template slot -scope = " scope " >
< el-button
:disabled = "scope.row.审核情况流水号!==3"
type = "danger"
size = "mini"
@click ="cancelRequestFund(scope.row)" > 取消请款 < / el -button >
< / template >
< / el-table-column >
< el-table-column label = "次数" min -width = " 60 " align = "center" type = "index" / >
< el-table-column label = "请款金额" width = "70" align = "center" >
< template slot -scope = " scope " >
@@ -95,25 +118,25 @@
< / el-table-column >
< el-table-column label = "请款时间" width = "90" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 请款时间 } }
{ { scope . row . 请款时间 ? scope . row . 请款时间 . split ( ' ' ) [ 0 ] : '' } }
< / template >
< / el-table-column >
< el-table-column label = "审核情况内容 " width = "80" align = "center" >
< el-table-column label = "审核情况" width = "80" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 审核情况内容 } }
< / template >
< / el-table-column >
< el-table-column label = "未通过审核原因" width = "8 0" align = "center" >
< el-table-column label = "未通过审核原因" width = "11 0" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 未通过审核原因 } }
< / template >
< / el-table-column >
< el-table-column label = "审批情况内容 " width = "80" align = "center" >
< el-table-column label = "审批情况" width = "80" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 审批情况内容 } }
< / template >
< / el-table-column >
< el-table-column label = "未通过审批原因" width = "8 0" align = "center" >
< el-table-column label = "未通过审批原因" width = "11 0" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 未通过审批原因 } }
< / template >
@@ -123,32 +146,14 @@
{ { scope . row . 付款情况内容 } }
< / template >
< / el-table-column >
< el-table-column label = "未付款原因" width = "8 0" align = "center" >
< el-table-column label = "未付款原因" width = "11 0" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 未付款原因 } }
< / template >
< / el-table-column >
< el-table-column width = "100" align = "center" >
< template slot -scope = " scope " >
< el-button
type = "danger"
size = "mini"
icon = ""
@click ="cancelRequestFund(scope.row)" > 取消请款 < / el -button >
< / template >
< / el-table-column >
< / el-table >
< / template >
< / el-table-column >
< el-table-column label = "请款" min -width = " 80 " align = "center" fixed = "right" >
< template slot -scope = " scope " >
< el-button
type = "primary"
size = "mini"
icon = ""
@click ="requestFund(scope.row)" > 请款 < / el -button >
< / template >
< / el-table-column >
< / el-table >
< div class = "block" style = "margin-top: 10px;" >
< el-pagination
@@ -164,22 +169,22 @@
< / el-card >
< el-card >
< span > 请款开始 时间 : < / span >
< span > 请款时间区 间 : < / span >
< el-date-picker
v-model = "startRequestDate"
size = "small"
type = "date"
value -format = " yyyy -MM -dd "
format = "yyyy-MM-dd"
placeholder = "选择 日期" / >
< span > 请款结束时间 : < / span >
placeholder = "开始 日期" / >
~
< el-date-picker
v-model = "endRequestDate"
size = "small"
type = "date"
value -format = " yyyy -MM -dd "
format = "yyyy-MM-dd"
placeholder = "选择 日期" / >
placeholder = "结束 日期" / >
< el-button
type = "success"
size = "small"
@@ -190,7 +195,8 @@
type = "warning"
size = "small"
icon = "el-icon-download"
style = "margin-left:10px" > 导出Excel < / el-button >
style = "margin-left:10px"
> 导出Excel < / el-button >
< / el-card >
< el-card >
@@ -207,10 +213,10 @@
< / el-table-column >
< el-table-column label = "规定到货时间" width = "100" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 规定到货时间 } }
{ { scope . row . 规定到货时间 . split ( ' ' ) [ 0 ] } }
< / template >
< / el-table-column >
< el-table-column label = "供应商" min -width = " 1 50" align = "center" >
< el-table-column label = "供应商" min -width = " 2 50" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 供应商名称 } }
< / template >
@@ -242,46 +248,11 @@
< / el-table-column >
< el-table-column label = "请款时间" width = "100" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 请款时间 } }
{ { scope . row . 请款时间 . split ( ' ' ) [ 0 ] } }
< / template >
< / el-table-column >
< / el-table >
< / el-card >
< el-dialog :visible.sync = "dialogVisible2" title = "采购员选择" center style = "min-height: 300px;" width = "40%" >
< el-table
:data = "tableData02"
size = "small"
border
style = "width: 100%;min-height:300px"
height = "300px"
highlight -current -row
@ row -click = " clickBuyer " >
< el-table-column label = "考勤编号" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 考勤编号 } }
< / template >
< / el-table-column >
< el-table-column label = "姓名" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 姓名 } }
< / template >
< / el-table-column >
< el-table-column label = "性别" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 性别 } }
< / template >
< / el-table-column >
< el-table-column label = "工作岗位" align = "center" >
< template slot -scope = " scope " >
{ { scope . row . 岗位名称 } }
< / template >
< / el-table-column >
< / el-table >
< div slot = "footer" class = "dialog-footer" >
< el-button :disabled = "submitDisable" type = "primary" size = "small" icon = "el-icon-check" @click ="submitSelectBuyer" > 确定 < / el -button >
< / div >
< / el-dialog >
< / div >
< / template >
@@ -292,8 +263,8 @@ import { mapGetters } from 'vuex'
export default {
data ( ) {
return {
tableData02 : [ ] ,
dialogVisible2 : false ,
personValue : '' ,
person : [ ] ,
loading2 : false ,
tableData2 : [ ] ,
tableData11 : [ ] ,
@@ -303,37 +274,10 @@ export default {
startDate : '' ,
endDate : '' ,
contractNum : '' ,
buyerName : '' ,
dialogVisible1 : false ,
submitDisable : true ,
form1 : { } ,
supplierValue : '' ,
supplierName : '' ,
enterpriseNature : '' ,
createDate : '' ,
registeredCapital : '' ,
taxNum : '' ,
EMail : '' ,
address : '' ,
account : '' ,
openingBank : '' ,
phone : '' ,
fax : '' ,
goodTime : '' ,
supplierCheck1 : 0 ,
supplierCheck2 : 0 ,
supplierCheck3 : 0 ,
supplierCheck4 : 0 ,
supplierCheck5 : 0 ,
supplierCheck6 : 0 ,
supplierCheck7 : 0 ,
supplierCheck8 : 0 ,
supplierCheck9 : 0 ,
supplierCheck10 : 0 ,
supplierCheck11 : 0 ,
supplierCheck12 : 0 ,
tableData01 : [ ] ,
loading1 : false ,
tableData1 : [ ] ,
check1 : 0 ,
check2 : 0 ,
@@ -352,45 +296,43 @@ export default {
'id'
] )
} ,
created ( ) {
this . initBuyer ( )
} ,
methods : {
submitSelectBuyer ( ) { // 确定
this . dialogVisible2 = false
} ,
clickBuyer ( row ) { // 点击采购员表某一行
this . submitDisable = false
this . buyerName = row . 姓名
} ,
initBuyer ( ) { // 初始化采购人员
initBuyer ( ) . then ( response => {
this . tableData02 = response . data
for ( let i = 0 ; i < response . data . length ; i ++ ) {
this . person . push ( {
text : response . data [ i ] . 姓名 ,
label : response . data [ i ] . 姓名 ,
value : response . data [ i ] . 人员编号
} )
}
} )
} ,
searchTable1 ( ) {
this . loading1 = true
this . tableData1 = [ ]
this . startDate && this . endDate ? this . check1 = 1 : this . check1 = 0
this . contractNum ? this . check2 = 1 : this . check2 = 0
this . buyerNam e ? this . check3 = 1 : this . check3 = 0
this . personValu e ? this . check3 = 1 : this . check3 = 0
this . supplierName ? this . check4 = 1 : this . check4 = 0
searchTable1 ( this . pageCurrent1 , this . pageSize1 , this . check1 , this . startDate , this . endDate , this . check2 , this . contractNum , this . check3 , this . buyerNam e, this . check4 , this . supplierName ) . then ( response => {
searchTable1 ( this . pageCurrent1 , this . pageSize1 , this . check1 , this . startDate , this . endDate , this . check2 , this . contractNum , this . check3 , this . personValu e, this . check4 , this . supplierName ) . then ( response => {
for ( let j = 0 ; j < response . data . rows . length ; j ++ ) {
if ( response . data . rows [ j ] . 规定到货时间 !== null ) {
response . data . rows [ j ] . 规定到货时间 = response . data . rows [ j ] . 规定到货时间 . substring ( 0 , response . data . rows [ j ] . 规定到货时间 . indexOf ( ' ' ) )
}
this . tableData11 [ j ] = [ ]
searchCondition ( response . data . rows [ j ] . 采购合同流水号 ) . then ( response0 => {
this . tableData1 = response . data . rows
this . total1 = response . data . total
for ( let i = 0 ; i < response0 . data . length ; i ++ ) {
if ( response0 . data [ i ] . 请款时间 !== null ) {
response0 . data [ i ] . 请款时间 = response0 . data [ i ] . 请款时间 . substring ( 0 , response0 . data [ i ] . 请款时间 . indexOf ( ' ' ) )
if ( response0 . data . length === 0 ) {
this . tableData11 [ j ] . push ( response0 . data )
document . getElementById ( j ) . setAttribute ( 'style' , 'display:none' )
} else {
for ( let i = 0 ; i < response0 . data . length ; i ++ ) {
this . tableData11 [ j ] . push ( response0 . data [ i ] )
}
this . tableData11 [ j ] . push ( response0 . data [ i ] )
}
} )
}
} ) . then ( ( ) => {
this . loading1 = false
this . tableData1 = response . data . rows
this . total1 = response . data . total
} )
} ,
handleSizeChange1 ( val ) {
@@ -416,6 +358,7 @@ export default {
} )
} ,
cancelRequestFund ( row ) { // 取消请款
console . log ( row )
this . $confirm ( '确认取消请款吗?' , '提示' , {
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
@@ -443,14 +386,17 @@ export default {
} ,
searchRequestTable ( ) { // 查询请款表
this . loading2 = true
if ( this . startRequestDate === '' || this . startRequestDate === null || this . endRequestDate === '' || this . endRequestDate === null ) {
if ( ( this . startRequestDate === '' || this . startRequestDate === null ) && ( this . endRequestDate === '' || this . endRequestDate === null ) ) {
this . checkRequest = 0
} else { this . check Request = 1 }
} else if ( this . startRequestDate !== '' && this . startRequestDate !== null && this . end RequestDate != = '' && this . endRequestDate !== null ) {
this . checkRequest = 1
} else {
this . $message . error ( '请款时间区间有误' )
this . loading2 = false
return
}
searchRequestTable ( this . checkRequest , this . startRequestDate , this . endRequestDate ) . then ( response => {
for ( let j = 0 ; j < response . data . length ; j ++ ) {
if ( response . data [ j ] . 规定到货时间 !== null ) {
response . data [ j ] . 规定到货时间 = response . data [ j ] . 规定到货时间 . substring ( 0 , response . data [ j ] . 规定到货时间 . indexOf ( ' ' ) )
}
if ( response . data [ j ] . 请款时间 !== null ) {
response . data [ j ] . 请款时间 = response . data [ j ] . 请款时间 . substring ( 0 , response . data [ j ] . 请款时间 . indexOf ( ' ' ) )
}