|
|
@@ -27,10 +27,10 @@
|
|
|
<el-button type="primary" size="mini" style="margin-left: 8px"
|
|
|
v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5" @click="saveinfochange">保存
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitaudit"
|
|
|
+ <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
|
|
|
v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
|
|
|
+ <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
|
|
|
v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
|
|
|
</el-button>
|
|
|
<router-link :to="'/oilsupplier/supplierappend/techlist'">
|
|
|
@@ -518,10 +518,10 @@
|
|
|
<el-table-column prop="Remark" label="描述" show-overflow-tooltip></el-table-column>
|
|
|
</el-table>
|
|
|
<div style="float: right; margin: 20px;">
|
|
|
- <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitaudit"
|
|
|
+ <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
|
|
|
v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
|
|
|
+ <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
|
|
|
v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -671,7 +671,7 @@
|
|
|
<wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="提交初审" :visible.sync="AuditdialogShow" width="520px">
|
|
|
+ <el-dialog title="提交初审" :visible.sync="dialogSeparateUnitAuditVisible" width="520px">
|
|
|
<el-form ref="searchForm" label-width="110px">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
@@ -722,12 +722,12 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" @click="AuditdialogShow = false">取 消</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="AuditEntity" :loading="btnloading">确定</el-button>
|
|
|
+ <el-button size="mini" @click="dialogSeparateUnitAuditVisible = false">取 消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="separateUnitSubmitAuditMakeSure" :loading="btnloading">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="分办" :visible.sync="ComAuditdialogShow" width="520px">
|
|
|
+ <el-dialog title="分办" :visible.sync="dialogComSubmitToSeparateUnitVisible" width="520px">
|
|
|
<el-form ref="searchForm" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
@@ -761,8 +761,8 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" @click="ComAuditdialogShow = false">取 消</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="SubpEntity" :loading="btnloading">确定</el-button>
|
|
|
+ <el-button size="mini" @click="dialogComSubmitToSeparateUnitVisible = false">取 消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="companySubmitToSecUnitSeparate" :loading="btnloading">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
@@ -842,23 +842,18 @@
|
|
|
import uploadajax from '@/assets/js//uploadajax.js'
|
|
|
import api from '@/api/oilsupplier/supplierappendsub'
|
|
|
import api2 from '@/api/oilsupplier/supplierappend'
|
|
|
- import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
|
|
|
import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
|
|
|
import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
|
|
|
import setapi from '@/api/oilsupplier/oilclassorgset'
|
|
|
-
|
|
|
-
|
|
|
// v-viewer
|
|
|
- import Vue from 'vue';
|
|
|
+ import Vue from 'vue'
|
|
|
import Viewer from 'v-viewer'
|
|
|
import 'viewerjs/dist/viewer.css'
|
|
|
Vue.use(Viewer)
|
|
|
Viewer.setDefaults({
|
|
|
Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
export default {
|
|
|
components: {
|
|
|
WfMultiHistory,
|
|
|
@@ -1010,6 +1005,8 @@
|
|
|
audithistoryshow: false,
|
|
|
chooseAuditorVisible: false,
|
|
|
chooseAuditorVisibleFen: false,
|
|
|
+ dialogSeparateUnitAuditVisible: false,
|
|
|
+ dialogComSubmitToSeparateUnitVisible: false,
|
|
|
orgauditOptions: [],
|
|
|
UnitOrgOptions: [],
|
|
|
orgtreelist: [], // 二级单位
|
|
|
@@ -1918,9 +1915,7 @@
|
|
|
this.myitemsshow = true
|
|
|
},
|
|
|
// 保存信息变更数据
|
|
|
- saveinfochange () {
|
|
|
- console.log(this.subfileList1, '增项')
|
|
|
- console.log(this.formData.InStyle, '增项')
|
|
|
+ saveinfochange (val) {
|
|
|
if (this.formData.InStyle == '4' && !(this.subfileList1[0]['OldFileUrl'] != '' || this.subfileList1[0]['FileUrl'] != '')) {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -1937,10 +1932,12 @@
|
|
|
api.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.getSupplierData()
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
+ if (val !== 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -2328,16 +2325,186 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- imgFormat(val,index){
|
|
|
- if(val !=null && val != undefined && val !=''){
|
|
|
+ comSubmitToSeparateUnitClick () {
|
|
|
+ this.dialogComSubmitToSeparateUnitVisible = true
|
|
|
+ },
|
|
|
+ // 二级单位代为申请, 提交按钮
|
|
|
+ separateUnitSubmitClick () {
|
|
|
+ this.saveinfochange(1)
|
|
|
+ console.log('二级单位代为申请, 点击提交')
|
|
|
+ if ([2, 4, 6].includes(parseInt(this.formData.InStyle))) {
|
|
|
+ this.allowpre = false
|
|
|
+ } else {
|
|
|
+ this.changeOrgUnit(this.selectDept)
|
|
|
+ this.allowpre = true
|
|
|
+ }
|
|
|
+ this.getFirAuditerByDept()
|
|
|
+ this.dialogSeparateUnitAuditVisible = true
|
|
|
+ },
|
|
|
+ // 二级分办单位提交审批
|
|
|
+ separateUnitSubmitAuditMakeSure () {
|
|
|
+ console.log('二级分办单位,确认提交审批')
|
|
|
+ this.saveinfochange(1)
|
|
|
+ let checkRes = this.separateUnitSubmitAuditParamsCheck()
|
|
|
+ if (!checkRes) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.btnloading = true
|
|
|
+ let params = {
|
|
|
+ firstAudit: this.auditer,
|
|
|
+ SecondAudit: this.fushenauditer,
|
|
|
+ ThirdAudit: this.selectDept,
|
|
|
+ AuditRemark: this.auditform.AuditRemark
|
|
|
+ }
|
|
|
+ api2.separateUnitAuditEntity(this.formData.Id, params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.getEntityById()
|
|
|
+ this.dialogSeparateUnitAuditVisible = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.btnloading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 二级分办单位提交审批参数检查
|
|
|
+ separateUnitSubmitAuditParamsCheck () {
|
|
|
+ if (this.myentityList == null || this.myentityList.length <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '没有新增准入项,不能提交!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for (let idx in this.subfileList1) {
|
|
|
+ if (this.subfileList1[idx].OldFileUrl === '' && this.subfileList1[idx].FileUrl === '') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: this.subfileList1[idx].NeedFileType + '没有上传,不能提交!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.auditer === '') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择初审人!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.fushenauditer === '') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择复审人!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.formData.InStyle === '1' || this.formData.InStyle === '5') {
|
|
|
+ if (this.selectDept === 0 || this.selectDept === '') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择专业处室!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.formData.InStyle === '1' || this.formData.InStyle === '5') {
|
|
|
+ if (this.userOptions == null || this.userOptions.length === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '该专业科室未配置接收人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ // 企业用户自行提交审批
|
|
|
+ companySubmitToSecUnitSeparate () {
|
|
|
+ let checkRes = this.companySubmitToSecUnitParamsCheck
|
|
|
+ if (!checkRes) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.btnloading = true
|
|
|
+ // this.auditform.FirstAuditName = this.UnitOrg
|
|
|
+ // this.auditform.CertId = this.formData.Id
|
|
|
+ // this.auditform.TypeCode = '01'
|
|
|
+ let params = {
|
|
|
+ UnitId: this.UnitOrg,
|
|
|
+ AuditRemark: this.auditform.AuditRemark
|
|
|
+ }
|
|
|
+ api2.companyAuditEntity(this.formData.Id, params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.getEntityById()
|
|
|
+ this.dialogComSubmitToSeparateUnitVisible = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.btnloading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ companySubmitToSecUnitParamsCheck () {
|
|
|
+ if (this.myentityList == null || this.myentityList.length <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '没有新增准入项,不能提交!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for (let idx in this.subfileList1) {
|
|
|
+ if (this.subfileList1[idx].OldFileUrl === '' && this.subfileList1[idx].FileUrl === '') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: this.subfileList1[idx].NeedFileType + '没有上传,不能提交!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.UnitOrg === '') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择分办单位!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.orgauditOptions == null || this.orgauditOptions.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '该单位未配置分办人!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ imgFormat (val, index) {
|
|
|
+ if (val != null && val != undefined && val !='') {
|
|
|
let fileurlall = val.split('$')[index]
|
|
|
let fileurl = fileurlall.split('|')
|
|
|
- if(fileurl[1] != null && fileurl[1] !='' && fileurl[1] != undefined){
|
|
|
- let Format = fileurl[1].split(".")
|
|
|
- if(Format[1]!=null && Format[1] !='' && Format[1] != undefined){
|
|
|
- let pictureFormat = Format[1];
|
|
|
- if("jpg"== pictureFormat || "bmp" ==pictureFormat || "png" ==pictureFormat || "gif" ==pictureFormat|| "jpeg" ==pictureFormat){
|
|
|
- return false;
|
|
|
+ if (fileurl[1] != null && fileurl[1] != '' && fileurl[1] != undefined) {
|
|
|
+ let Format = fileurl[1].split('.')
|
|
|
+ if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
|
|
|
+ let pictureFormat = Format[1]
|
|
|
+ if (pictureFormat == 'jpg' || pictureFormat == 'bmp' || pictureFormat == 'png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
|
|
|
+ return false
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2625,9 +2792,7 @@
|
|
|
// 取消
|
|
|
cancelOption () {
|
|
|
this.dialogVisible = false
|
|
|
-
|
|
|
},
|
|
|
-
|
|
|
// 确定
|
|
|
ensureOption () {
|
|
|
this.dialogloading = true
|
|
|
@@ -3019,7 +3184,7 @@
|
|
|
jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
- } else if (val === '0001-01-01T00:00:00Z') {
|
|
|
+ } else if (val === '0001-01-01T00:00:00Z') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
return '----'
|