|
|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-dialog title="提交"
|
|
|
+ <!-- <el-dialog title="提交"
|
|
|
:visible.sync="dialogVisibleCom"
|
|
|
width="520px">
|
|
|
<el-form ref="searchForm"
|
|
|
@@ -43,9 +43,83 @@
|
|
|
type="primary"
|
|
|
@click="companySubmitToSecUnitSeparateMakeSure" :loading="loading">确定</el-button>
|
|
|
</span>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
|
|
|
|
|
|
+ <el-dialog title="提交初审"
|
|
|
+ :visible.sync="dialogVisibleCom"
|
|
|
+ width="520px">
|
|
|
+ <el-form ref="searchForm"
|
|
|
+ label-width="100px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="初审人员">
|
|
|
+ <el-select ref="selectAuditer"
|
|
|
+ v-model="auditer"
|
|
|
+ placeholder="请选择初审人"
|
|
|
+ style="width: 100%"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ @change="auditOrgChang()">
|
|
|
+ <el-option v-for="item in firOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Realname"
|
|
|
+ :value="item.Id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="复审人员">
|
|
|
+ <el-select ref="selectAuditer"
|
|
|
+ v-model="fushenauditer"
|
|
|
+ placeholder="请选择复审人"
|
|
|
+ style="width: 100%"
|
|
|
+ filterable
|
|
|
+ default-first-option>
|
|
|
+ <el-option v-for="item in secauditerOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Realname"
|
|
|
+ :value="item.Id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="专业处室">
|
|
|
+ <el-select v-model="selectDept"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="changeOrgUnit">
|
|
|
+ <el-option v-for="item in allorgunitOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Fullname"
|
|
|
+ :value="item.Id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input v-model="auditform.AuditRemark"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入备注内容">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer"
|
|
|
+ class="dialog-footer">
|
|
|
+ <el-button size="mini"
|
|
|
+ @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="secondaryUnitSubmitApply" :loading="loading">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <choose-auditor-fen ref="chooseAuditorFen"
|
|
|
+ @close="setAuditerFen"
|
|
|
+ @hideChooseAuditer="chooseAuditorVisibleFen=false"
|
|
|
+ :visible="chooseAuditorVisibleFen"></choose-auditor-fen>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
@@ -53,7 +127,12 @@
|
|
|
|
|
|
<script>
|
|
|
import {mapGetters} from 'vuex'
|
|
|
+ import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
|
|
|
import api from '@/api/oilsupplier/supplier'
|
|
|
+ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
+ import apiOilcontract from '@/api/oilcontract/contract'
|
|
|
+
|
|
|
+
|
|
|
export default {
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
@@ -62,23 +141,52 @@
|
|
|
},
|
|
|
name: 'submitPopup',
|
|
|
components: {
|
|
|
-
|
|
|
+ ChooseAuditorFen
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ // 从合同进来还是从编辑进来 1合同2编辑
|
|
|
+ eveId: {
|
|
|
+ type: null,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
- dialogVisibleCom:false,
|
|
|
- loading: false,
|
|
|
- UnitOrgOptions: [],
|
|
|
- UnitOrg: '',
|
|
|
-
|
|
|
+ chooseAuditorVisibleFen:false,
|
|
|
+ auditer: '',
|
|
|
+ auditerName: '',
|
|
|
+ firOptions: [],
|
|
|
+ fushenauditer: '', // 复审人员
|
|
|
+ secauditerOptions: [],
|
|
|
+ selectDept: 100000151,
|
|
|
+ allorgunitOptions: [],
|
|
|
auditform: {
|
|
|
FirstAuditName: '',
|
|
|
SecondAudit: '',
|
|
|
ThirdAudit: '',
|
|
|
CertId: '',
|
|
|
- AuditRemark: ''
|
|
|
+ AuditRemark: '',
|
|
|
+ TypeCode: '02'
|
|
|
},
|
|
|
+ majorDept: [100000000, 100000128, 100000151],
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ dialogVisibleCom:false,
|
|
|
+ loading: false,
|
|
|
+ UnitOrgOptions: [],
|
|
|
+ UnitOrg: '',
|
|
|
+
|
|
|
+ // auditform: {
|
|
|
+ // FirstAuditName: '',
|
|
|
+ // SecondAudit: '',
|
|
|
+ // ThirdAudit: '',
|
|
|
+ // CertId: '',
|
|
|
+ // AuditRemark: ''
|
|
|
+ // },
|
|
|
formData: {
|
|
|
Id: '',
|
|
|
SupplierName: '',
|
|
|
@@ -160,9 +268,156 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ // this.getDictOptions()
|
|
|
+ // this.serviceId = this.$route.params.opera + ''
|
|
|
+ // if (this.$route.query.rtn) {
|
|
|
+ // this.showReturn = 0
|
|
|
+ // }
|
|
|
+ // if (this.$route.query.certid) {
|
|
|
+ // this.certId = this.$route.query.certid + ''
|
|
|
+ // }
|
|
|
+ // if (this.serviceId !== 'add' && this.serviceId > 0) {
|
|
|
+ // this.formData.Id = this.serviceId
|
|
|
+ // } else {
|
|
|
+ // this.formData.Id = 0
|
|
|
+ // }
|
|
|
+ // this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
|
+
|
|
|
+ // // this.getorgtreelist()
|
|
|
+ // if (this.IsCompanyUser && this.serviceId === 'add') {
|
|
|
+ // // apiCert.getEntityByCreatorAndType('02', this.$axios).then(res => {
|
|
|
+ // // this.certId = res.data.Id
|
|
|
+ // // this.serviceId = res.data.SupplierId
|
|
|
+ // // this.formData.Id = res.data.SupplierId
|
|
|
+ // // this.initDatas()
|
|
|
+ // // }).catch(err => {
|
|
|
+ // // console.error(err)
|
|
|
+ // // })
|
|
|
+ // this.inputCompany(this.authUser.Profile.Realname)
|
|
|
+ // } else {
|
|
|
+ // this.initDatas()
|
|
|
+ // }
|
|
|
+ this.getFirAuditerByDept()
|
|
|
this.getDictOptions()
|
|
|
+ this.orgtreeChange(this.majorDept)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ setAuditerFen (val, name) {
|
|
|
+ this.auditer = val
|
|
|
+ this.auditerName = name
|
|
|
+ this.chooseAuditorVisibleFen = false
|
|
|
+ this.auditOrgChang(this.auditer)
|
|
|
+ },
|
|
|
+ orgtreeChange (val) {
|
|
|
+ this.userOptions = []
|
|
|
+ let deptid = val[val.length - 1]
|
|
|
+ let auditstepcode = 'PROF_RECE'
|
|
|
+ api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
|
|
|
+ console.log('专业处室人111',res)
|
|
|
+ this.userOptions = res.data.item
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getFirAuditerByDept () {
|
|
|
+ let deptId = this.authUser.Profile.DepartmentId
|
|
|
+ this.userOptions = []
|
|
|
+ let auditStepCode = 'FIRST_TRIAL' // 初审人
|
|
|
+ api.getFirAuditerByDept(deptId, auditStepCode, this.$axios).then(res => {
|
|
|
+ this.firOptions = res.data.item
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ secondaryUnitSubmitApply (val) {
|
|
|
+ if (!this.auditer) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择审批人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.fushenauditer) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择复审人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.selectDept) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择专业处室!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.userOptions || this.userOptions.length === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '该专业科室未配置接收人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ // this.applyLoading = true
|
|
|
+ let params = {
|
|
|
+ 'FirstAudit': String(this.auditer),
|
|
|
+ 'SecondAudit': String(this.fushenauditer),
|
|
|
+ 'ThirdAudit': String(this.selectDept), // this.majorDept[this.majorDept.length - 1] 专业处室部门id
|
|
|
+ 'AuditRemark': this.auditform.AuditRemark
|
|
|
+ }
|
|
|
+ apiOilcontract.contractUnitAudit(this.eveId, params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ // this.initDatas()
|
|
|
+ // if (this.$refs['WfHistory']) {
|
|
|
+ // this.$refs['WfHistory'].getHistoryTask()
|
|
|
+ // }
|
|
|
+ this.$parent.showIdDatas(this.eveId);
|
|
|
+ this.dialogVisibleCom = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // this.applyLoading = false
|
|
|
+ this.loading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ auditOrgChang () {
|
|
|
+ let auditstepcode = 'SECOND_TRIAL'
|
|
|
+ api
|
|
|
+ .getAuditerByFirst(this.auditer, auditstepcode, this.$axios)
|
|
|
+ .then(res => {
|
|
|
+ this.secauditerOptions = res.data.item
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeOrgUnit (val) {
|
|
|
+ let auditstepcode = 'PROF_RECE'
|
|
|
+ api.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
|
|
|
+ console.log('专业处室人222',res)
|
|
|
+ this.userOptions = res.data.item
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
getDictOptions () {
|
|
|
let params = {
|
|
|
status: this.formData.Status,
|