@ -1,119 +1,107 @@
< template >
< div >
< el -row :gutter ="15" >
< el -form ref = "elForm" :model ="dataForm" :rules ="dataRule" size = "small" label -width = " 100px " label -position = " right "
: disabled = "setting.readonly" >
< el -form ref = "elForm" :model ="dataForm" :rules ="dataRule" size = "small" label -width = " 100px "
label - position = "right" : disabled = "setting.readonly" >
< template v-if ="!loading && formOperates" >
< el -col :span ="8 " v-if ="judgeShow('documentNo')" >
< el -col :span ="6 " v-if ="judgeShow('documentNo')" >
< el -form -item label = "单据编号" prop = "documentNo" >
< el -input :disabled ="judgeWrite('documentNo')" v -model = " dataForm.documentNo " placeholder = "系统自动生成"
readonly >
< el -input :disabled ="judgeWrite('documentNo')" v -model = " dataForm.documentNo "
placeholder = "系统自动生成" readonly >
< / e l - i n p u t >
< / e l - f o r m - i t e m >
< / e l - c o l >
<!-- < el -col :span ="8" v-if ="judgeShow('purchaseId')" >
< el -form -item label = "采购订单" prop = "purchaseId" >
< popupSelect :disabled ="judgeWrite('purchaseId')" v -model = " dataForm.purchaseId " placeholder = "请选择"
clearable field = "purchaseId" interfaceId = "389673535976550149" : columnOptions = "purchaseIdcolumnOptions"
propsValue = "id" relationField = "document_no" popupType = "dialog" popupTitle = "选择数据" popupWidth = "800px"
hasPage : pageSize = "20" >
< / popupSelect >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" v-if ="judgeShow('contractId')" >
< el -form -item label = "合同" prop = "contractId" >
< popupSelect :disabled ="judgeWrite('contractId')" v -model = " dataForm.contractId " placeholder = "请选择"
clearable field = "contractId" interfaceId = "389673903103979269" : columnOptions = "contractIdcolumnOptions"
propsValue = "id" relationField = "contract_name" popupType = "dialog" popupTitle = "选择数据" popupWidth = "800px"
hasPage : pageSize = "20" >
< / popupSelect >
< / e l - f o r m - i t e m >
< / e l - c o l > - - >
< el -col :span ="8" v-if ="judgeShow('supplierId')" >
< el -col :span ="6" v-if ="judgeShow('supplierId')" >
< el -form -item label = "供应商" prop = "supplierId" >
< popupSelect v -model = " dataForm.supplierId " placeholder = "请选择"
clearable field = "supplierId" interfaceId = "389674191453990661" : columnOptions = "supplierIdcolumnOptions"
propsValue = "id" relationField = "supplier_name" popupType = "dialog" popupTitle = "选择数据" popupWidth = "800px"
hasPage : pageSize = "20" : disabled = "true" >
< popupSelect v -model = " dataForm.supplierId " placeholder = "请选择" clearable field = "supplierId"
interfaceId = "389674191453990661" : columnOptions = "supplierIdcolumnOptions"
propsValue = "id" relationField = "supplier_name" popupType = "dialog" popupTitle = "选择数据"
popupWidth = "800px" hasPage : pageSize = "20" : disabled = "true" >
< / popupSelect >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8 " v-if ="judgeShow('paymentType')" >
< el -col :span ="6" v-if ="judgeShow('paymentType')" >
< el -form -item label = "付款类型" prop = "paymentType" >
< el -select :disabled ="judgeWrite('paymentType')" v -model = " dataForm.paymentType " placeholder = "请选择"
clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in paymentTypeOptions " :key ="index" :label ="item.fullName"
: value = "item.id" : disabled = "item.disabled" > < / e l - o p t i o n >
< el -select :disabled ="judgeWrite('paymentType')" v -model = " dataForm.paymentType "
placeholder = "请选择" clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in paymentTypeOptions " :key ="index"
: label = "item.fullName" : value = "item.id" : disabled = "item.disabled" > < / 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 ="8 " v-if ="judgeShow('businessDate')" >
< el -col :span ="6" v-if ="judgeShow('businessDate')" >
< el -form -item label = "业务日期" prop = "businessDate" >
< el -date -picker :disabled ="judgeWrite('businessDate')" v -model = " dataForm.businessDate " placeholder = "请选择"
clearable : style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd" value - format = "timestamp" >
< el -date -picker :disabled ="judgeWrite('businessDate')" v -model = " dataForm.businessDate "
placeholder = "请选择" clearable : style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd"
value - format = "timestamp" >
< / e l - d a t e - p i c k e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8 " v-if ="judgeShow('currency')" >
< el -col :span ="6 " v-if ="judgeShow('currency')" >
< el -form -item label = "币别" prop = "currency" >
< el -select v -model = " dataForm.currency " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v-for ="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" > < / el -option >
< el -select :disabled ="true" v -model = " dataForm.currency " placeholder = "请选择" clearable
: style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in currencyOptions " :key ="index" :label ="item.fullName"
: value = "item.id" : disabled = "item.disabled" > < / 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 ="8 " v-if ="judgeShow('settlementType')" >
< el -col :span ="6 " v-if ="judgeShow('settlementType')" >
< el -form -item label = "结算类型" prop = "settlementType" >
< el -select :disabled ="judgeWrite('settlementType')" v -model = " dataForm.settlementType " placeholder = "请选择"
clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in settlementTypeOptions " :key ="index" :label ="item.fullName"
: value = "item.id" : disabled = "item.disabled" > < / e l - o p t i o n >
< el -select :disabled ="judgeWrite('settlementType')" v -model = " dataForm.settlementType "
placeholder = "请选择" clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in settlementTypeOptions " :key ="index"
: label = "item.fullName" : value = "item.id" : disabled = "item.disabled" > < / 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 ="8 " v-if ="judgeShow('ramount')" >
< el -col :span ="6 " v-if ="judgeShow('ramount')" >
< el -form -item label = "申请金额" prop = "ramount" >
< el -input -number v -model = " dataForm.ramount " placeholder = "数字文本" :step ="1"
: precision = "6" : style = '{"width":"100%"}' : disabled = "true ">
< el -input -number :disabled ="true" v -model = " dataForm.ramount " : style = '{"width":"100%"}'
placeholder = "数字文本" : step = "1" : precision = "6 ">
< / e l - i n p u t - n u m b e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" v-if ="judgeShow('paymentAmount')" >
< el -form -item label = "付款金额" prop = "paymentAmount" >
< el -input -number v -model = " dataForm.paymentAmount "
placeholder = "数字文本" : step = "1" : precision = "6" : style = '{"width":"100%"}' : disabled = "true" >
< el -col :span ="6" v-if ="judgeShow('paymentAmount')" >
< el -form -item label = "已付款金额" prop = "paymentAmount" >
< el -input -number :disabled ="true" v -model = " dataForm.paymentAmount " : style = '{"width":"100%"}'
placeholder = "数字文本" : step = "1" : precision = "6" >
< / e l - i n p u t - n u m b e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" v-if ="judgeShow('paymentAmountHistory')" >
< el -form -item label = "历史已付" prop = "paymentAmountHistory" >
< el -input -number :disabled ="true" v -model = " dataForm.paymentAmountHistory "
: style = '{"width":"100%"}' placeholder = "数字文本" : step = "1" : precision = "6" >
< el -col :span ="8" v-if ="judgeShow('unpaymentAmount')" >
< / e l - i n p u t - n u m b e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" v-if ="judgeShow('unpaymentAmount')" >
< el -form -item label = "未付款金额" prop = "unpaymentAmount" >
< el -input -number v -model = " dataForm.unpaymentAmount "
placeholder = "数字文本" : step = "1" : precision = "6" : style = '{"width":"100%"}' : disabled = "true" >
< el -input -number :disabled ="true" v -model = " dataForm.unpaymentAmount "
: style = '{"width":"100%"}' placeholder = "数字文本" : step = "1" : precision = "6 ">
< / e l - i n p u t - n u m b e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8 " v-if ="judgeShow('collectionAccount')" >
< el -col :span ="6 " v-if ="judgeShow('collectionAccount')" >
< el -form -item label = "收款账户" prop = "collectionAccount" >
< el -input :disabled ="judgeWrite('collectionAccount')" v -model = " dataForm.collectionAccount "
placeholder = "请输入" clearable : style = '{"width":"100%"}' >
@ -122,58 +110,89 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8 " v-if ="judgeShow('colectionBank')" >
< el -col :span ="6 " v-if ="judgeShow('colectionBank')" >
< el -form -item label = "收款银行" prop = "colectionBank" >
< el -input :disabled ="judgeWrite('colectionBank')" v -model = " dataForm.colectionBank " placeholder = "请输入"
clearable : style = '{"width":"100%"}' >
< el -input :disabled ="judgeWrite('colectionBank')" v -model = " dataForm.colectionBank "
placeholder = "请输入" clearable : style = '{"width":"100%"}' >
< / e l - i n p u t >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8 " v-if ="judgeShow('dueDate')" >
< el -col :span ="6 " v-if ="judgeShow('dueDate')" >
< el -form -item label = "应付日期" prop = "dueDate" >
< el -date -picker :disabled ="judgeWrite('dueDate')" v -model = " dataForm.dueDate " placeholder = "请选择" clearable
: style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd" value - format = "timestamp" >
< el -date -picker :disabled ="judgeWrite('dueDate')" v -model = " dataForm.dueDate "
placeholder = "请选择" clearable : style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd"
value - format = "timestamp" >
< / e l - d a t e - p i c k e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" v-if ="judgeShow('isPay')" >
<!-- < el -col :span ="8" v-if ="judgeShow('isPay')" >
< el -form -item label = "是否付款" prop = "isPay" >
< el -select v -model = " dataForm.isPay " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v-for ="(item, index) in isPayOptions" :key="index" :label="item.fullName" :value="item.id" > < / el -option >
< el -select :disabled ="true" v -model = " dataForm.isPay " placeholder = "请选择"
clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in isPayOptions " :key ="index" :label ="item.fullName"
: value = "item.id" : disabled = "item.disabled" > < / 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 >
< / e l - c o l > - - >
<!--
< el -col :span ="8" v-if ="judgeShow('status')" >
< el -form -item label = "单据状态" prop = "status" >
< el -select :disabled ="judgeWrite('status')" v -model = " dataForm.status " placeholder = "请选择"
clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in statusOptions " :key ="index" :label ="item.fullName"
: value = "item.id" : disabled = "item.disabled" > < / e l - o p t i o n >
< el -col :span ="16" v-if ="judgeShow('remark')" >
< / 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 ="12" v-if ="judgeShow('remark')" >
< el -form -item label = "备注" prop = "remark" >
< el -input :disabled ="judgeWrite('remark')" v -model = " dataForm.remark " placeholder = "请输入" clearable
: style = '{"width":"100%"}' >
< el -input :disabled ="judgeWrite('remark')" v -model = " dataForm.remark " placeholder = "请输入"
clearable : style = '{"width":"100%"}' >
< / e l - i n p u t >
< / e l - f o r m - i t e m >
< / e l - c o l >
<!-- < el -col :span ="8" v-if ="judgeShow('departmentId')" >
< el -form -item label = "部门id" prop = "departmentId" >
< el -input :disabled ="judgeWrite('departmentId')" v -model = " dataForm.departmentId "
placeholder = "请输入" clearable : style = '{"width":"100%"}' >
< / e l - i n p u t >
< / e l - f o r m - i t e m >
< / e l - c o l > - - >
< el -col :span ="24" >
< el -tabs v-model ="activewhkxlj" tab-position="top" class="mb-20" >
< el -tab -pane label = "申请明细" >
< el -col :span ="24" v-if ="judgeShow('paymentdocitem0List') && formOperates" >
< el -form -item label -width = " 0 " >
< div class = "JNPF-common-title" >
< h2 > < / h2 >
< / div >
< el -table :data ="dataForm.paymentdocitem0List" size = 'mini' show -summary :summary-method ="getSummaries" >
< el -table :data ="dataForm.paymentdocitem0List" size = 'mini' show -summary
: summary - method = "getSummaries" >
< el -table -column type = "index" width = "50" label = "序号" align = "center" / >
< el -table -column prop = "amount" width = "200" label = "申请金额" v-if ="judgeShow('paymentdocitem0List-amount')" align="center" >
< template slot = "header" v-if ="judgeRequired('paymentdocitem0List-amount')" >
< el -table -column prop = "amount" width = "200" label = "申请金额"
v - if = "judgeShow('paymentdocitem0List-amount')" align = "center" >
< template slot = "header"
v - if = "judgeRequired('paymentdocitem0List-amount')" >
< span class = "required-sign" > * < / span > 申请金额
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.amount "
: disabled = "judgeWrite('paymentdocitem0List') || judgeWrite('paymentdocitem0List-amount')"
placeholder = "请输入" clearable : style = '{"width":"100%"}' @ change = "amountChange(scope.row)" >
placeholder = "请输入" clearable : style = '{"width":"100%"}'
@ change = "amountChange(scope.row)" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -182,18 +201,28 @@
订单金额
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.allAmount "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.allAmount " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "payPrice " width = "200" label = "已付金额" align = "center" >
< el -table -column prop = "paymentAmount " width = "200" label = "已付金额" align = "center" >
< template slot = "header" >
已付金额
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.payPrice "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.paymentAmount " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "payPrice" width = "200" label = "已付金额" align = "center" >
< template slot = "header" >
历史已付
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.payPrice " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -202,8 +231,8 @@
订单编号
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.documentNo "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.documentNo " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -212,8 +241,8 @@
合同编号
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.contractNo "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.contractNo " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -222,18 +251,19 @@
结算重量
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.num "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.num " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "advanceAmount" width = "200" label = "垫资金额" align = "center" >
< el -table -column prop = "advanceAmount" width = "200" label = "垫资金额"
align = "center" >
< template slot = "header" >
垫资金额
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.advanceAmount "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.advanceAmount " placeholder = "请输入"
clearable : style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -242,8 +272,8 @@
税额
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.rate "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.rate " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -252,8 +282,8 @@
不含税金额
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.notAmount "
placeholder = "请输入" clearable : style = '{"width":"100%"}' readonly >
< el -input v -model = " scope.row.notAmount " placeholder = "请输入" clearable
: style = '{"width":"100%"}' readonly >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
@ -263,25 +293,319 @@
< / template >
< template slot -scope = " scope " >
< el -date -picker v -model = " scope.row.creatorTime " placeholder = "请选择"
clearable : style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd" value - format = "timestamp" readonly >
clearable : style = '{"width":"100%"}' type = "date"
format = "yyyy-MM-dd" value - format = "timestamp" readonly >
< / e l - d a t e - p i c k e r >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" width = "50" v-if ="!setting.readonly && !judgeWrite('paymentdocitem0List')" >
< el -table -column label = "操作" width = "50"
v - if = "!setting.readonly && !judgeWrite('paymentdocitem0List')" >
< template slot -scope = " scope " >
< el -button size = "mini" type = "text" class = "JNPF-table-delBtn"
@ click = "delpaymentdocitem0List(scope.$index)" > 删除 < / e l - b u t t o n >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< div class = "table-actions" @click ="addpaymentdocitem0List()"
<!-- < div class = "table-actions" @click ="addpaymentdocitem0List()"
v - if = "!setting.readonly && !judgeWrite('paymentdocitem0List')" >
< el -button type = "text" icon = "el-icon-plus" > 添加 < / e l - b u t t o n >
< / div > -- >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - t a b - p a n e >
< el -tab -pane label = "磅单详情" >
< el -col :span ="24" v-if ="judgeShow('paymentdocitem1List') && formOperates" >
< el -form -item label -width = " 0 " >
< div class = "JNPF-common-title" >
< h2 > < / h2 >
< / div >
< el -table :data ="dataForm.paymentdocitem1List" size = 'mini' show -summary
: summary - method = "getSummaries2" >
<!-- < el -table -column prop = "poundlistId" label = "磅单id"
v - if = "judgeShow('paymentdocitem1List-poundlistId')" >
< template slot = "header"
v - if = "judgeRequired('paymentdocitem1List-poundlistId')" >
< span class = "required-sign" > * < / span > 磅单id
< / template >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.poundlistId "
: disabled = "judgeWrite('paymentdocitem1List') || judgeWrite('paymentdocitem1List-poundlistId')"
placeholder = "请输入" clearable : style = '{"width":"100%"}' >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n > - - >
< el -table -column type = "index" width = "50" label = "序号" align = "center" / >
<!-- < el -table -column prop = "vehicleId" label = "车辆" align = "center" width = "130" >
< template slot -scope = " scope " >
< popupSelect v -model = " scope.row.vehicleId " placeholder = "请选择" clearable
: field = "'vehicleId'+scope.$index" interfaceId = "389754644018016581"
: columnOptions = "purchaseorderitem0vehicleIdcolumnOptions" propsValue = "vehicle_id"
relationField = "ticketno" popupType = "dialog" popupWidth = "800px" hasPage : pageSize = "20" : disabled = "true" >
< / popupSelect >
< / template >
< / e l - t a b l e - c o l u m n > - - >
< el -table -column prop = "isFirstpay" label = "是否优先付款 " align = "center"
width = "100" : disabled = "true" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.isFirstpay " placeholder = "请选择"
clearable : style = '{"width":"100%"}' >
< el -option v -for = " ( item , index ) in advanceOptions " :key ="index"
: label = "item.fullName" : value = "item.id" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "purchaseorderNo" label = "采购订单号" align = "center"
width = "250" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.purchaseorderNo " placeholder = "请输入"
clearable : style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "isPay" label = "是否付款 " align = "center" width = "100"
: disabled = "true" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.isPay " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v -for = " ( item , index ) in advanceOptions " :key ="index"
: label = "item.fullName" : value = "item.id"
: disabled = "item.disabled" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "vehicleName" label = "车辆" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.vehicleName " placeholder = "请输入"
clearable : style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "materialName" label = "物料" align = "center" width = "180" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.materialName " placeholder = "请输入"
clearable : style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
<!-- < el -table -column prop = "materialId" label = "物料" align = "center" width = "180" >
< template slot -scope = " scope " >
< popupSelect v -model = " scope.row.materialId " placeholder = "请选择" clearable
: field = "'materialId'+scope.$index" interfaceId = "397736371898382533"
: columnOptions = "purchaseorderitem0materialIdcolumnOptions" propsValue = "id"
relationField = "item_name" popupType = "dialog" popupWidth = "800px" hasPage : pageSize = "20"
: disabled = "true" >
< / popupSelect >
< / template >
< / e l - t a b l e - c o l u m n > - - >
< el -table -column prop = "poundType" label = "磅单类型" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.poundType " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v -for = " ( item , index ) in poundTypeOptions "
: key = "index" : label = "item.fullName" : value = "item.id"
: disabled = "item.disabled" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "netWeight" label = "净重" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.netWeight " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "unit" label = "单位" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.unit " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v -for = " ( item , index ) in unitOptions " :key ="index"
: label = "item.fullName" : value = "item.id"
: disabled = "item.disabled" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "advance" label = "是否垫资 " align = "center" width = "130"
: disabled = "true" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.advance " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v -for = " ( item , index ) in advanceOptions " :key ="index"
: label = "item.fullName" : value = "item.id"
: disabled = "item.disabled" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "price" label = "单价" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.price " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "settlement" label = "结算重量 " align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.settlement " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "rate" label = "税率 " align = "center" width = "130" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.rate " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v -for = " ( item , index ) in rateOptions " :key ="index"
: label = "item.fullName" : value = "item.id"
: disabled = "item.disabled" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "amount" label = "金额" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.amount " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "notAmount" label = "不含税金额" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.notAmount " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "remark" label = "备注" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.remark " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" width = "50"
v - if = "!setting.readonly && !judgeWrite('paymentdocitem1List')" >
< template slot -scope = " scope " >
< el -button size = "mini" type = "text" class = "JNPF-table-delBtn"
@ click = "delpaymentdocitem1List(scope.$index)" > 删除 < / e l - b u t t o n >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< div class = "table-actions" @click ="addpaymentdocitem1List()"
v - if = "!setting.readonly && !judgeWrite('paymentdocitem1List')" >
< el -button type = "text" icon = "el-icon-plus" > 添加 < / e l - b u t t o n >
< / div >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - t a b - p a n e >
< el -tab -pane label = "文件详情" >
< el -col :span ="24" v-if ="judgeShow('paymentdocitem2List') && formOperates" >
< el -form -item label -width = " 0 " >
< div class = "JNPF-common-title" >
< h2 > < / h2 >
< / div >
< el -table :data ="dataForm.paymentdocitem2List" size = 'mini' >
< el -table -column type = "index" width = "50" label = "序号" align = "center" / >
< el -table -column prop = "enclosure" label = "文件附件" >
< template slot = "header" >
< span class = "required-sign" > * < / span > 文件附件
< / template >
< template slot -scope = " scope " >
< JNPF -UploadFz v -model = " scope.row.enclosure " :fileSize ="15"
sizeUnit = "MB" : limit = "9" buttonText = "点击上传" >
< / J N P F - U p l o a d F z >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" width = "50" >
< template slot -scope = " scope " >
< el -button size = "mini" type = "text" class = "JNPF-table-delBtn"
@ click = "delpaymentdocitem2List(scope.$index)" > 删除 < / e l - b u t t o n >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< div class = "table-actions" @click ="addpaymentdocitem2List()" >
< el -button type = "text" icon = "el-icon-plus" > 添加 < / e l - b u t t o n >
< / div >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - t a b - p a n e >
< el -tab -pane label = "付款记录" >
< el -col :span ="24" v-if ="judgeShow('paymentEntityList') && formOperates" >
< el -form -item label -width = " 0 " >
< div class = "JNPF-common-title" >
< h2 > < / h2 >
< / div >
< el -table :data ="dataForm.paymentEntityList" size = 'mini' >
< el -table -column type = "index" width = "50" label = "序号" align = "center" / >
< el -table -column prop = "documentno" label = "付款单号" align = "center"
width = "250" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.documentno " placeholder = "请输入"
clearable : style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "duedate" label = "应付日期" align = "center" width = "160" >
< template slot -scope = " scope " >
< el -date -picker v -model = " scope.row.duedate " placeholder = "请选择" clearable
: style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd" value - format = "timestamp" readonly >
< / e l - d a t e - p i c k e r >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "businessdate" label = "实付日期" align = "center" width = "160" >
< template slot -scope = " scope " >
< el -date -picker v -model = " scope.row.businessdate " placeholder = "请选择" clearable
: style = '{"width":"100%"}' type = "date" format = "yyyy-MM-dd" value - format = "timestamp" readonly >
< / e l - d a t e - p i c k e r >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "paymentamount" label = "付款金额" align = "center"
width = "250" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.paymentamount " placeholder = "请输入"
clearable : style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "settlementtype" label = "付款方式" align = "center"
width = "250" >
< template slot -scope = " scope " >
< el -select v -model = " scope.row.settlementtype " placeholder = "请选择" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< el -option v -for = " ( item , index ) in settlementTypeOptions "
: key = "index" : label = "item.fullName" : value = "item.id"
: disabled = "item.disabled" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "remark" label = "备注" align = "center" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.remark " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "creatorUserName" label = "付款人" align = "center" width = "130" >
< template slot -scope = " scope " >
< el -input v -model = " scope.row.creatorUserName " placeholder = "请输入" clearable
: style = '{"width":"100%"}' : disabled = "true" >
< / e l - i n p u t >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - t a b - p a n e >
< / e l - t a b s >
< / e l - c o l >
< / template >
< / e l - f o r m >
< / e l - r o w >
@ -321,6 +645,7 @@
settlementType : "0" ,
ramount : 0 ,
paymentAmount : 0 ,
paymentAmountHistory : 0 ,
unpaymentAmount : 0 ,
collectionAccount : '' ,
colectionBank : '' ,
@ -328,9 +653,14 @@
isPay : "0" ,
status : "0" ,
remark : '' ,
departmentId : '' ,
paymentdocitem0List : [ ] ,
paymentdocitem1List : [ ] ,
paymentdocitem2List : [ ] ,
paymentEntityList : [ ] ,
} ,
tableRequiredData : { } ,
activewhkxlj : '0' ,
dataRule : { } ,
purchaseIdcolumnOptions : [ {
"label" : "采购订单号" ,
@ -404,6 +734,87 @@
"fullName" : "商票" ,
"id" : "5"
} ] ,
purchaseorderitem0vehicleIdcolumnOptions : [ {
"label" : "车牌号" ,
"value" : "ticketno"
} , {
"label" : "物料名称" ,
"value" : "item_name"
} , {
"label" : "结算重量" ,
"value" : "settlement"
} , {
"label" : "计量单位" ,
"value" : "unitName"
} , {
"label" : "采购单价" ,
"value" : "purchase_price"
} , {
"label" : "磅单类型" ,
"value" : "poundTypeName"
} , ] ,
purchaseorderitem0materialIdcolumnOptions : [ {
"label" : "物料编码" ,
"value" : "item_code"
} , {
"label" : "物料名称" ,
"value" : "item_name"
} , {
"label" : "单位" ,
"value" : "primary_unit_of_measure"
} , {
"label" : "可采购" ,
"value" : "purchase_flag_name"
} , {
"label" : "可销售" ,
"value" : "sales_flag_name"
} , ] ,
poundTypeOptions : [ {
"fullName" : "贸易" ,
"id" : "0"
} , {
"fullName" : "自加工" ,
"id" : "1"
} , {
"fullName" : "委外" ,
"id" : "2"
} , {
"fullName" : "倒运" ,
"id" : "3"
} ] ,
unitOptions : [ {
"fullName" : "吨" ,
"id" : "0"
} , {
"fullName" : "千克" ,
"id" : "1"
} ] ,
advanceOptions : [ {
"fullName" : "否" ,
"id" : "0"
} , {
"fullName" : "是" ,
"id" : "1"
} ] ,
rateOptions : [ {
"fullName" : "13" ,
"id" : "0"
} , {
"fullName" : "9" ,
"id" : "1"
} , {
"fullName" : "6" ,
"id" : "2"
} , {
"fullName" : "5" ,
"id" : "3"
} , {
"fullName" : "3" ,
"id" : "4"
} , {
"fullName" : "0" ,
"id" : "5"
} ] ,
isPayOptions : [ {
"fullName" : "否" ,
"id" : "0"
@ -437,7 +848,39 @@
mounted ( ) { } ,
methods : {
getSummaries ( param ) {
const { columns , data } = param ;
const {
columns ,
data
} = param ;
const sums = [ ] ;
columns . forEach ( ( column , index ) => {
if ( index === 0 ) {
sums [ index ] = '合计' ;
return ;
}
const values = data . map ( item => Number ( item [ column . property ] ) ) ;
if ( ! values . every ( value => isNaN ( value ) ) && ( index === 1 || index === 2 || index === 3 ||
index === 6 || index === 7 || index === 8 || index === 9 ) ) {
sums [ index ] = values . reduce ( ( prev , curr ) => {
const value = Number ( curr ) ;
if ( ! isNaN ( value ) ) {
return prev + curr ;
} else {
return prev ;
}
} , 0 ) ;
} else {
sums [ index ] = '' ;
}
} ) ;
return sums ;
} ,
getSummaries2 ( param ) {
const {
columns ,
data
} = param ;
const sums = [ ] ;
columns . forEach ( ( column , index ) => {
if ( index === 0 ) {
@ -445,7 +888,8 @@
return ;
}
const values = data . map ( item => Number ( item [ column . property ] ) ) ;
if ( ! values . every ( value => isNaN ( value ) ) && ( index === 1 || index === 2 || index === 3 || index === 6 || index === 7 || index === 8 || index === 9 ) ) {
if ( ! values . every ( value => isNaN ( value ) ) && ( index === 7 || index === 11 || index === 13 ||
index === 14 ) ) {
sums [ index ] = values . reduce ( ( prev , curr ) => {
const value = Number ( curr ) ;
if ( ! isNaN ( value ) ) {
@ -501,26 +945,42 @@
this . dataInfo ( res . data )
this . loading = false
} )
}
} else {
if ( data . purchaseorder && data . purchaseorder . length > 0 ) {
this . dataForm . supplierId = data . purchaseorder [ 0 ] . supplierId
this . dataForm . collectionAccount = data . purchaseorder [ 0 ] . collectionAccount
this . dataForm . colectionBank = data . purchaseorder [ 0 ] . colectionBank
this . dataForm . businessDate = new Date ( )
this . dataForm . dueDate = new Date ( )
var ramount = 0 ;
var paymentAmount = 0 ;
var paymentAmountHistory = 0 ;
var unpaymentAmount = 0 ;
var paymentdocitem1List = [ ] ;
this . dataForm . paymentEntityList = [ ] ;
data . purchaseorder . forEach ( ( item , index ) => {
item . allAmount = item . amount ;
item . amount = item . allAmount - item . payPrice ;
item . purchaseorderId = item . id ;
item . id = '' ;
ramount = ramount + item . amount ; / / 申 请 金 额
paymentAmount = paymentAmount + item . payPrice ; / / 已 付 款 金 额
unpaymentAmount = item . allAmount - item . payPrice ; / / 未 付 款 金 额
item . paymentAmount = 0 ;
paymentAmount = paymentAmount + item . paymentAmount ; / / 已 付 款 金 额
paymentAmountHistory = paymentAmountHistory + item . payPrice ; / / 已 付 款 金 额
unpaymentAmount = unpaymentAmount + ( item . allAmount - item . payPrice ) ; / / 未 付 款 金 额
item . poundlistEntityList . forEach ( ( item2 , index2 ) => {
item2 . price = item2 . purchasePrice ;
item2 . poundlistId = item2 . id ;
item2 . purchaseorderId = item . purchaseorderId ;
item2 . id = '' ;
paymentdocitem1List . push ( item2 ) ;
} ) ;
} ) ;
this . dataForm . paymentdocitem1List = paymentdocitem1List ;
this . dataForm . ramount = ramount ;
this . dataForm . paymentAmount = paymentAmount ;
this . dataForm . unpaymentAmount = unpaymentAmount ;
this . dataForm . paymentAmountHistory = paymentAmountHistory ;
this . dataForm . paymentdocitem0List = data . purchaseorder ;
let param = {
param : 'fukuanshenqing'
@ -533,6 +993,7 @@
this . dataForm . documentNo = res . msg
} ) ;
}
}
this . $emit ( 'setPageLoad' )
} )
this . $store . commit ( 'generator/UPDATE_RELATION_DATA' , { } )
@ -620,6 +1081,21 @@
} ,
/ / 表 单 提 交
dataFormSubmit ( eventType ) {
var statusFlag = true ;
this . dataForm . paymentdocitem0List . forEach ( ( item , index ) => {
if ( item . amount > item . allAmount ) {
statusFlag = false ;
return
}
} ) ;
if ( ! statusFlag ) {
this . $message ( {
type : 'error' ,
message : '申请金额不能大于订单金额' ,
duration : 1000
} ) ;
return
}
this . $refs [ 'elForm' ] . validate ( ( valid ) => {
if ( valid ) {
if ( this . exist && ! this . exist ( ) ) return
@ -687,11 +1163,36 @@
delpaymentdocitem0List ( index ) {
this . dataForm . paymentdocitem0List . splice ( index , 1 ) ;
} ,
addpaymentdocitem1List ( ) {
let item = {
poundlistId : undefined ,
}
this . dataForm . paymentdocitem1List . push ( item )
} ,
delpaymentdocitem1List ( index ) {
this . dataForm . paymentdocitem1List . splice ( index , 1 ) ;
} ,
addpaymentdocitem2List ( ) {
let item = {
enclosure : undefined ,
}
this . dataForm . paymentdocitem2List . push ( item )
} ,
delpaymentdocitem2List ( index ) {
this . dataForm . paymentdocitem2List . splice ( index , 1 ) ;
} ,
dataList ( ) {
var _data = JSON . parse ( JSON . stringify ( this . dataForm ) ) ;
for ( let i = 0 ; i < _data . paymentdocitem0List . length ; i ++ ) {
var _list = _data . paymentdocitem0List [ i ] ;
}
for ( let i = 0 ; i < _data . paymentdocitem1List . length ; i ++ ) {
var _list = _data . paymentdocitem1List [ i ] ;
}
for ( let i = 0 ; i < _data . paymentdocitem2List . length ; i ++ ) {
var _list = _data . paymentdocitem2List [ i ] ;
_list . enclosure = JSON . stringify ( _list . enclosure )
}
return _data ;
} ,
dataInfo ( dataAll ) {
@ -699,6 +1200,13 @@
for ( let i = 0 ; i < _dataAll . paymentdocitem0List . length ; i ++ ) {
var _list = _dataAll . paymentdocitem0List [ i ] ;
}
for ( let i = 0 ; i < _dataAll . paymentdocitem1List . length ; i ++ ) {
var _list = _dataAll . paymentdocitem1List [ i ] ;
}
for ( let i = 0 ; i < _dataAll . paymentdocitem2List . length ; i ++ ) {
var _list = _dataAll . paymentdocitem2List [ i ] ;
_list . enclosure = JSON . parse ( _list . enclosure )
}
this . dataForm = _dataAll
} ,
} ,