@ -9,10 +9,10 @@
< el -input v-model ="searchData.applicant" clearable style="width: 120px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item : label = "' '" >
< el -button @click ="getDataList" > 查询 < / el -button >
< el -button @click ="addOrUpdateHandle()" > 新增 < / el -button >
< el -button @click ="exportHandle()" > 导出 < / el -button >
< el -button @click ="searchHandle()" > 搜索 < / el -button >
< el -button v-if ="authSearch" @click ="getDataList"> 查询 < / el -button >
< el -button v-if ="authUpdate" @click ="addOrUpdateHandle()"> 新增 < / el -button >
< el -button v-if ="authSearch" @click ="exportHandle()"> 导出 < / el -button >
< el -button v-if ="authSearch" @click ="searchHandle()"> 搜索 < / el -button >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -56,8 +56,9 @@
< el -table -column prop = "remark" header -align = " center " align = "center" label = "备注/Remark" width = "220" :show-overflow-tooltip ="true" > < / e l - t a b l e - c o l u m n >
< el -table -column fixed = "right" header -align = " center " align = "center" width = "130" label = "操作/Operation" >
< template slot -scope = " scope " >
< el -link style = "cursor: pointer" @click ="addOrUpdateHandle(scope.row)" > 编辑 < / el -link >
< el -link v-if ="scope.row.status === '草稿'" style="cursor: pointer; margin-left: 10px;" @click="issueModal(scope.row)" > 下达 < / el -link >
< el -link v-if ="authUpdate && scope.row.status !== '已完成'" style="cursor: pointer" @click="addOrUpdateHandle(scope.row)" > 编辑 < / el -link >
< el -link v-if ="authUpdate && scope.row.status === '已完成'" style="cursor: pointer" @click="addOrUpdateHandle(scope.row)" > 详情 < / el -link >
< el -link v-if ="authIssue && scope.row.status === '草稿'" style="cursor: pointer; margin-left: 10px;" @click="issueModal(scope.row)" > 下达 < / el -link >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
@ -73,8 +74,6 @@
layout = "total, sizes, prev, pager, next, jumper" >
< / e l - p a g i n a t i o n >
<!-- 编辑模态框 -- >
< el -dialog
: title = "modalTitle"
@ -290,11 +289,10 @@
< / e l - t a b s >
< el -footer style = "height:35px;margin-top: 15px;text-align:center" >
< el -button type = "primary" v-if ="modalData.status === '草稿'" @click="dataFormSubmit()" > 保存 < / el -button >
< el -button type = "primary" v-if ="authUpdate && modalData.status === '草稿'" @click="dataFormSubmit()" > 保存 < / el -button >
< el -button type = "primary" @ click = "modalFlag = false" > 关闭 < / e l - b u t t o n >
<!-- 走OA流程按钮预留 -- >
< el -button type = "primary" v-if ="modalData.status === '审批中'" @click="agreeSubmit" > 同意 < / el -button >
< el -button type = "primary" v-if ="modalData.status === '审批中'" @click="rejectSubmit" > 驳回 < / el -button >
< el -button type = "primary" v-if ="authSubmit && modalData.status === '审批中'" :loading="submitLoading" @click="agreeSubmit" > 同意 < / el -button >
< el -button type = "primary" v-if ="authReject && modalData.status === '审批中'" :loading="submitLoading" @click="openRejectModal" > 驳回 < / el -button >
< / e l - f o o t e r >
< / e l - d i a l o g >
@ -340,10 +338,22 @@
< / e l - f o r m >
< / e l - d i a l o g >
< el -dialog title = "驳回" top = "30vh" :close-on-click-modal ="false" v -drag :visible.sync ="submitModalFlag" width = "500px" >
< el -form label -position = " top " >
< el -form -item label = "驳回意见/Reject Opinion" >
< el -input type = "textarea" v-model ="rejectOpinion" :rows="3" resize="none" show-word-limit style="width: 479px;height: 30px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -footer style = "height:35px;text-align:center" >
< el -button type = "primary" :loading ="submitLoading" @click ="rejectSubmit" > 确定 < / el -button >
< el -button type = "primary" @ click = "submitModalFlag = false" > 取消 < / e l - b u t t o n >
< / e l - f o o t e r >
< / e l - d i a l o g >
<!-- 底部附件页签 -- >
< el -tabs v-model ="activeTable" style="width: 100%; height: 100%;" type="border-card" class="customer-tab" >
< el -tabs v-model ="activeTable" style="width: 100%; height: 100%;" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab" >
< el -tab -pane label = "基本信息" name = "basicInfo" >
< div : style = "{height: secondHeight - 25 + 'px'}" style = "margin-left: 5px;margin-top: 0px; overflow-y: auto;" >
< div : style = "{height: secondHeight + 'px'}" style = "margin-left: 5px;margin-top: 5 px; overflow-y: auto;" >
< el -form :inline ="true" label -position = " top " :model ="currentRow" >
< el -form -item >
< span slot = "label" > 申请人 / Applicant < / span >
@ -457,7 +467,7 @@
< / e l - t a b - p a n e >
< el -tab -pane label = "HSF 填写信息" name = "hsfInfo" >
< div : style = "{height: secondHeight - 25 + 'px'}" style = "margin-left: 5px;margin-top: 0 px; overflow-y: auto;" >
< div : style = "{height: secondHeight + 'px'}" style = "margin-left: 5px;margin-top: 5 px; overflow-y: auto;" >
< el -form :inline ="true" label -position = " top " :model ="currentRow" >
<!-- < el -form -item label = "单据状态/Doc Status" > < el -input : value = "currentRow.status || ''" disabled style = "width: 205px" > < / e l - i n p u t > < / e l - f o r m - i t e m > - - >
< el -form -item label = "SGS报告编号/SGS Report Number" > < el -input : value = "currentRow.sgsReportNumber || ''" disabled style = "width: 205px" > < / e l - i n p u t > < / e l - f o r m - i t e m >
@ -471,7 +481,7 @@
< / e l - t a b - p a n e >
< el -tab -pane label = "NPD 信息" name = "npdInfo" >
< div : style = "{height: secondHeight - 25 + 'px'}" style = "margin-left: 5px;margin-top: 0 px; overflow-y: auto;" >
< div : style = "{height: secondHeight + 'px'}" style = "margin-left: 5px;margin-top: 5 px; overflow-y: auto;" >
< el -form :inline ="true" label -position = " top " :model ="currentRow" >
< el -form -item label = "现有材料不同规格/Same Material Diff Size" > < el -input :value ="displayYesNo(currentRow.isSameMaterialDiffSize)" disabled style = "width: 205px" > < / e l - i n p u t > < / e l - f o r m - i t e m >
< el -form -item label = "材料描述/Material Desc." style = "display: block;" > < el -input type = "textarea" :rows ="3" : value = "currentRow.materialDesc || ''" disabled resize = "none" style = "width: 636px;height: 30px" > < / e l - i n p u t > < / e l - f o r m - i t e m >
@ -480,7 +490,7 @@
< / e l - t a b - p a n e >
< el -tab -pane label = "材料信息" name = "materialInfo" >
< div : style = "{height: secondHeight - 25 + 'px'}" style = "margin-left: 5px;margin-top: 0 px; overflow-y: auto;" >
< div : style = "{height: secondHeight + 'px'}" style = "margin-left: 5px;margin-top: 5 px; overflow-y: auto;" >
< el -form :inline ="true" label -position = " top " :model ="currentRow" >
< el -form -item label = "材料IFS编号/IFS Part No." > < el -input : value = "currentRow.ifsPartNo || ''" disabled style = "width: 205px" > < / e l - i n p u t > < / e l - f o r m - i t e m >
< / e l - f o r m >
@ -502,6 +512,9 @@
: order - ref2 = "currentRow.referenceNo" >
< / o s s - c o m p o n e n t s >
< / e l - t a b - p a n e >
< el -tab -pane label = "审批信息" name = "approvalInformation" >
< approval -information v -model :data-list ="approvalList" :height ="secondHeight" > < / a p p r o v a l - i n f o r m a t i o n >
< / e l - t a b - p a n e >
< / e l - t a b s >
< ChooseList ref = "baseList" @getBaseData ="getBaseData" > < / ChooseList >
< / div >
@ -518,13 +531,15 @@ import uploadFileList from '../common/uploadFileList'
import ossComponents from '../oss/ossComponents.vue'
import ChooseList from '@/views/modules/common/Chooselist'
import DictDataSelect from "../sys/dict-data-select.vue"
import ApprovalInformation from "../changeManagement/approvalInformation.vue"
export default {
components : {
uploadFileList ,
ossComponents ,
ChooseList ,
DictDataSelect
DictDataSelect ,
ApprovalInformation
} ,
data ( ) {
return {
@ -557,9 +572,54 @@ export default {
currentRow : { } ,
currentRowNameSeq : 0 ,
fileColumnList : [
{ columnLabel : '文件名称' , columnProp : 'fileName' , headerAlign : 'center' , align : 'left' , columnWidth : '100' } ,
{ columnLabel : '上传人' , columnProp : 'createBy' , headerAlign : 'center' , align : 'left' , columnWidth : '100' } ,
{ columnLabel : '上传日期' , columnProp : 'createDate' , headerAlign : 'center' , align : 'center' , columnWidth : '100' }
{
columnProp : 'fileName' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '文件名称' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
status : true ,
fixed : '' ,
columnWidth : 140
} ,
{
columnProp : 'fileRemark' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '备注' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
status : true ,
fixed : '' ,
columnWidth : 240
} ,
{
columnProp : 'createDate' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '上传时间' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
status : true ,
fixed : '' ,
columnWidth : 140
} ,
{
columnProp : 'createBy' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '上传人' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
status : true ,
fixed : '' ,
columnWidth : 140
}
] ,
modalFlag : false ,
@ -573,8 +633,12 @@ export default {
} ,
projectList : [ ] ,
fileList : [ ] ,
approvalList : [ ] ,
modalTitle : 'RoHs 新增' ,
activeName : 'basicInfo' ,
submitModalFlag : false ,
rejectOpinion : '' ,
submitLoading : false ,
modalData : {
site : 'DEFAULT' ,
referenceNo : '' ,
@ -624,7 +688,9 @@ export default {
this . checkSuperAdmin ( )
} ,
mounted ( ) {
this . getDataList ( )
if ( this . authSearch ) {
this . getDataList ( )
}
this . $nextTick ( ( ) => {
this . height = window . innerHeight / 2 - 30
/*第二个表格高度的动态调整*/
@ -675,14 +741,21 @@ export default {
this . currentRow = row || { }
}
this . loadCurrentRowNames ( )
this . refreshCurrentTabTable ( )
} ) . catch ( ( ) => {
this . currentRow = row || { }
this . loadCurrentRowNames ( )
this . refreshCurrentTabTable ( )
} )
} ,
currentChange ( val ) {
this . currentRow = val || { }
this . loadCurrentRowNames ( )
if ( val ) {
this . loadCurrentRowNames ( )
this . refreshCurrentTabTable ( )
} else {
this . approvalList = [ ]
}
} ,
loadCurrentRowNames ( ) {
if ( ! this . currentRow ) {
@ -779,9 +852,41 @@ export default {
return ''
} )
} ,
refreshCurrentTabTable ( ) {
if ( this . activeTable === 'approvalInformation' ) {
this . getApprovalList ( )
}
} ,
getApprovalList ( ) {
if ( ! this . currentRow || ! this . currentRow . site || ! this . currentRow . referenceNo ) {
this . approvalList = [ ]
return
}
let params = {
site : this . currentRow . site ,
menuId : this . menuId ,
documentNo : this . currentRow . referenceNo
}
api . getRohsApprovalList ( params ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . approvalList = data . rows || [ ]
} else {
this . approvalList = [ ]
}
} ) . catch ( ( ) => {
this . approvalList = [ ]
} )
} ,
/ / 获 取 列 表
getDataList ( ) {
if ( ! this . authSearch ) {
this . dataList = [ ]
this . totalPage = 0
this . currentRow = { }
this . approvalList = [ ]
return
}
this . dataListLoading = true
let params = {
page : this . pageIndex ,
@ -805,10 +910,12 @@ export default {
this . dataList = [ ]
this . totalPage = 0
this . currentRow = { }
this . approvalList = [ ]
}
this . dataListLoading = false
} ) . catch ( ( ) => {
this . currentRow = { }
this . approvalList = [ ]
this . dataListLoading = false
} )
} ,
@ -824,6 +931,9 @@ export default {
} ,
/ / 搜 索 条 件 点 击
searchHandle ( ) {
if ( ! this . authSearch ) {
return
}
this . pageIndex = 1
this . getDataList ( )
} ,
@ -837,14 +947,27 @@ export default {
} ,
/ / 导 出
exportHandle ( ) {
if ( ! this . authSearch ) {
return
}
this . $message . info ( '导出功能开发中' )
} ,
/ / 新 增 / 修 改
addOrUpdateHandle ( row ) {
if ( ! row && ! this . authUpdate ) {
this . $message . warning ( '没有新增权限' )
return
}
if ( row && ! this . authUpdate ) {
this . $message . warning ( '没有编辑权限' )
return
}
this . modalFlag = true
this . activeName = 'basicInfo'
this . fileList = [ ]
this . uploadDialog = false
this . submitModalFlag = false
this . rejectOpinion = ''
if ( row ) {
this . modalTitle = 'RoHs 编辑'
@ -931,6 +1054,10 @@ export default {
} ,
/ / 表 单 提 交
dataFormSubmit ( ) {
if ( ! this . authUpdate ) {
this . $message . warning ( '没有保存权限' )
return
}
this . modalData . qualificationDocumentsNeeded = this . modalData . qualificationDocumentsNeededList . join ( ';' )
this . modalData . testReportIncludingItems = this . modalData . testReportIncludingItemsList . join ( ';' )
this . modalData . materialClassify = this . modalData . materialClassifyList . join ( ';' )
@ -948,23 +1075,91 @@ export default {
} ,
/ / 同 意
agreeSubmit ( ) {
this . $message . info ( '同意(OA流程)待开发' )
if ( ! this . authSubmit ) {
this . $message . warning ( '没有同意权限' )
return
}
this . $confirm ( '确认同意该申请单?' , '提示' , {
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
type : 'warning'
} ) . then ( ( ) => {
this . submitRohs ( 'Y' )
} )
} ,
openRejectModal ( ) {
if ( ! this . authReject ) {
this . $message . warning ( '没有驳回权限' )
return
}
this . rejectOpinion = ''
this . submitModalFlag = true
} ,
/ / 驳 回
rejectSubmit ( ) {
this . $message . info ( '驳回(OA流程)待开发' )
if ( ! this . rejectOpinion || ! this . rejectOpinion . trim ( ) ) {
this . $message . warning ( '请填写驳回意见' )
return
}
this . submitRohs ( 'N' )
} ,
submitRohs ( nodeConclusion ) {
if ( nodeConclusion === 'Y' && ! this . authSubmit ) {
this . $message . warning ( '没有同意权限' )
return
}
if ( nodeConclusion === 'N' && ! this . authReject ) {
this . $message . warning ( '没有驳回权限' )
return
}
if ( ! this . modalData . site || ! this . modalData . referenceNo ) {
this . $message . warning ( '单据主键信息缺失,无法提交审批' )
return
}
this . submitLoading = true
let params = {
site : this . modalData . site ,
referenceNo : this . modalData . referenceNo ,
nodeConclusion : nodeConclusion ,
rejectOpinion : nodeConclusion === 'N' ? this . rejectOpinion : '' ,
menuId : this . menuId ,
documentNo : this . modalData . referenceNo
}
api . submitRohs ( params ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . $message . success ( nodeConclusion === 'Y' ? '同意成功' : '驳回成功' )
this . submitModalFlag = false
this . modalFlag = false
this . getDataList ( )
} else {
this . $message . error ( data . msg || '提交失败' )
}
this . submitLoading = false
} ) . catch ( ( ) => {
this . submitLoading = false
} )
} ,
/ / 下 达
issueModal ( row ) {
if ( ! this . authIssue ) {
this . $message . warning ( '没有下达权限' )
return
}
this . $confirm ( '确认下达该申请单?' , '提示' , {
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
type : 'warning'
} ) . then ( ( ) => {
const data = Object . assign ( { } , row , { status : '审批中' } )
api . updateRohs ( data ) . then ( ( { data } ) => {
let params = {
site : row . site ,
referenceNo : row . referenceNo
}
api . issueRohs ( params ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . $message . success ( '下达成功' )
if ( this . modalFlag && this . modalData . referenceNo === row . referenceNo ) {
this . modalData . status = '审批中'
}
this . getDataList ( )
} else {
this . $message . error ( data . msg || '下达失败' )
@ -1234,5 +1429,8 @@ export default {
}
< / script >
< style scoped >
< style scoped lang = "scss" >
/deep/ . customer - tab . el - tabs__content {
padding : 0 ! important ;
}
< / style >