Browse Source

Merge remote-tracking branch 'origin/master'

master
Rui_Li 1 year ago
parent
commit
51965c5fc4
  1. 121
      src/views/modules/changeManagement/changeRecord.vue

121
src/views/modules/changeManagement/changeRecord.vue

@ -2,7 +2,7 @@
<div class="mod-config"> <div class="mod-config">
<!-- 查询条件 --> <!-- 查询条件 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 130px"> <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 130px">
<el-option <el-option
@ -17,7 +17,7 @@
<el-input v-model="searchData.changeNo" clearable style="width: 120px"></el-input> <el-input v-model="searchData.changeNo" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button @click="getDataList">查询</el-button>
<el-button v-if="authSearch" @click="getDataList">查询</el-button>
<download-excel <download-excel
:fields="fields()" :fields="fields()"
:data="exportData" :data="exportData"
@ -67,8 +67,8 @@
width="100" width="100"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link v-if="scope.row.changeStatus !== '已完成'" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link v-if="scope.row.changeStatus === '草稿'" style="cursor: pointer" @click="issueModal(scope.row)">下达</el-link>
<el-link v-if="authUpdate && scope.row.changeStatus !== '已完成'" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link v-if="authIssue && scope.row.changeStatus === '草稿'" style="cursor: pointer" @click="issueModal(scope.row)">下达</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -280,8 +280,8 @@
<el-footer style="height:25px;text-align:center"> <el-footer style="height:25px;text-align:center">
<el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button> <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button> <el-button type="primary" @click="modalFlag = false">关闭</el-button>
<el-button v-if="modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
<el-button v-if="authSubmit && modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="authReject && modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
</el-footer> </el-footer>
</el-tab-pane> </el-tab-pane>
@ -379,8 +379,8 @@
<el-footer style="height:25px;text-align:center"> <el-footer style="height:25px;text-align:center">
<el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button> <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button> <el-button type="primary" @click="modalFlag = false">关闭</el-button>
<el-button v-if="modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
<el-button v-if="authSubmit && modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="authReject && modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
</el-footer> </el-footer>
</el-tab-pane> </el-tab-pane>
@ -529,8 +529,8 @@
<el-footer style="height:25px;text-align:center"> <el-footer style="height:25px;text-align:center">
<el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button> <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button> <el-button type="primary" @click="modalFlag = false">关闭</el-button>
<el-button v-if="modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
<el-button v-if="authSubmit && modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="authReject && modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
</el-footer> </el-footer>
</el-tab-pane> </el-tab-pane>
@ -583,8 +583,8 @@
<el-footer style="height:25px;text-align:center"> <el-footer style="height:25px;text-align:center">
<el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button> <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button> <el-button type="primary" @click="modalFlag = false">关闭</el-button>
<el-button v-if="modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
<el-button v-if="authSubmit && modalData.changeStatus === '审批中'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="authReject && modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
</el-footer> </el-footer>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -709,7 +709,19 @@
<!-- 附件信息页签 --> <!-- 附件信息页签 -->
<el-tab-pane label="附件信息" name="fileInformation"> <el-tab-pane label="附件信息" name="fileInformation">
<oss-components :disabled="currentRow.changeStatus === '已完成'" label="变更单号" :height="secondHeight - 25" style="margin-top: 2px" :columns="fileColumnList" :order-ref2="currentRow.changeNo" :order-ref1="currentRow.site"></oss-components>
<oss-components
:save-visible="authFileSave"
:download-visible="authFileDownLoad"
:remove-visible="authFileRemove"
:preview-visible="authFilePreview"
:disabled="currentRow.changeStatus === '已完成'"
label="变更单号"
:height="secondHeight - 25"
style="margin-top: 2px"
:columns="fileColumnList"
:order-ref2="currentRow.changeNo"
:order-ref1="currentRow.site">
</oss-components>
</el-tab-pane> </el-tab-pane>
<!-- 审批信息 --> <!-- 审批信息 -->
@ -2497,7 +2509,17 @@
submitModalFlag: false, submitModalFlag: false,
addDetailModal: false, addDetailModal: false,
saveLoading: false, saveLoading: false,
submitLoading: false
submitLoading: false,
menuId: this.$route.meta.menuId,
authSearch: false,
authUpdate: false,
authIssue: false,
authSubmit: false,
authReject: false,
authFileSave: false,
authFileDownLoad: false,
authFileRemove: false,
authFilePreview: false,
} }
}, },
@ -2510,48 +2532,50 @@
}, },
activated () { activated () {
if (this.$route.params.type === 'tokenLogin') {
if (this.$route.params.docNo) {
this.searchData.changeNo = this.$route.params.docNo
}
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
changeRecordSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
//
if (this.dataList.length > 0) {
//
this.$refs.changeTable.setCurrentRow(this.dataList[0])
this.updateModal(this.dataList[0])
} else {
this.currentRow = {}
if (this.authSearch) {
if (this.$route.params.type === 'tokenLogin') {
if (this.$route.params.docNo) {
this.searchData.changeNo = this.$route.params.docNo
}
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
changeRecordSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
//
if (this.dataList.length > 0) {
//
this.$refs.changeTable.setCurrentRow(this.dataList[0])
this.updateModal(this.dataList[0])
} else {
this.currentRow = {}
}
// table
this.refreshCurrentTabTable()
} }
// table
this.refreshCurrentTabTable()
})
} else {
if (this.$route.params.changeNo) {
this.searchData.changeNo = this.$route.params.changeNo
} }
})
} else {
if (this.$route.params.changeNo) {
this.searchData.changeNo = this.$route.params.changeNo
this.getDataList()
} }
this.getDataList()
} }
}, },
created () { created () {
//
this.getButtonAuthData()
this.getEcnModel() this.getEcnModel()
this.getEcnModel2() this.getEcnModel2()
this.getEcnCSModel() this.getEcnCSModel()
this.getBuBySite() this.getBuBySite()
}, },
methods: { methods: {
// bu // bu
getBuBySite () { getBuBySite () {
let tempData = { let tempData = {
@ -4198,6 +4222,19 @@
return { 'background-color': '#E8F7F6', cursor: 'pointer' }; return { 'background-color': '#E8F7F6', cursor: 'pointer' };
} }
}, },
//
getButtonAuthData () {
this.authSearch = this.isAuth(this.menuId+":search")
this.authUpdate = this.isAuth(this.menuId+":update")
this.authIssue = this.isAuth(this.menuId+":issue")
this.authSubmit = this.isAuth(this.menuId+":submit")
this.authReject = this.isAuth(this.menuId+":reject")
this.authFileSave = this.isAuth(this.menuId+":fileSave")
this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad")
this.authFileRemove = this.isAuth(this.menuId+":fileRemove")
this.authFilePreview = this.isAuth(this.menuId+":filePreview")
},
} }
} }
</script> </script>

Loading…
Cancel
Save