|
@@ -10,17 +10,37 @@
|
|
|
<el-form-item
|
|
|
label="证书类型"
|
|
|
prop="certificateType"
|
|
|
- style="width:100%;"
|
|
|
+ style="width:45%;"
|
|
|
>
|
|
|
<el-radio-group v-model="form.certificateType">
|
|
|
<el-radio :label="1">个人证书</el-radio>
|
|
|
<el-radio :label="2">企业证书</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="签字公司"
|
|
|
+ prop="company"
|
|
|
+ style="width:45%;"
|
|
|
+ v-if="form.certificateType===2"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="form.company"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 400px;"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
label="证书所有者"
|
|
|
prop="certificateUserName"
|
|
|
style="width:45%;"
|
|
|
+ v-if="form.company!=3"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.certificateUserName"
|
|
@@ -31,7 +51,7 @@
|
|
|
<el-form-item
|
|
|
label="所持证书者身份证ID"
|
|
|
prop="certificateId"
|
|
|
- v-if="form.certificateType==1"
|
|
|
+ v-if="form.certificateType==1&&form.company!=3"
|
|
|
style="width:45%;"
|
|
|
>
|
|
|
<el-input
|
|
@@ -44,7 +64,7 @@
|
|
|
label="企业统一社会信用代码"
|
|
|
style="width:45%;"
|
|
|
prop="enterpriseUnifiedCode"
|
|
|
- v-else
|
|
|
+ v-if="form.certificateType!==1&&form.company!=3"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.enterpriseUnifiedCode"
|
|
@@ -67,6 +87,7 @@
|
|
|
label="证书密码"
|
|
|
prop="certificatePassword"
|
|
|
style="width:45%;"
|
|
|
+ v-if="form.company!=3"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.certificatePassword"
|
|
@@ -78,6 +99,7 @@
|
|
|
label="证书文件"
|
|
|
style="width:45%;"
|
|
|
prop="certificateFileUrl"
|
|
|
+ v-if="form.company!=3"
|
|
|
>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
@@ -146,6 +168,7 @@
|
|
|
label="签名体图片"
|
|
|
style="width:100%;"
|
|
|
prop="signatureFileUrl"
|
|
|
+ v-if="form.company!=3"
|
|
|
>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
@@ -255,6 +278,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { save, getById, findUserByName, queryRole, queryProjectAndContract, addFileInfo, update, findPfxType } from "@/api/certificate/list";
|
|
|
+import {getDictionary as getDictbiz} from "@/api/system/dictbiz";
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -290,10 +314,24 @@ export default {
|
|
|
projectMeiju: [],//项目
|
|
|
ContractSection: [],//合同段
|
|
|
userData: [],//关联用户
|
|
|
- pfxType: []//
|
|
|
+ pfxType: [],//
|
|
|
+ options:[],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取签字公司
|
|
|
+ getOptions() {
|
|
|
+ getDictbiz({
|
|
|
+ code: 'es_type_name'
|
|
|
+ }).then((res) => {
|
|
|
+
|
|
|
+ this.options = res.data.data;
|
|
|
+ this.options.forEach((ele)=>{
|
|
|
+ ele.dictKey=Number(ele.dictKey)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ console.log( this.options,' this.options');
|
|
|
+ },
|
|
|
selectUser(){
|
|
|
let _this = this;
|
|
|
this.userData.forEach(vo => {
|
|
@@ -303,10 +341,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
async init () {
|
|
|
+
|
|
|
if (this.$route.query.id != 0) {
|
|
|
await this.getById()
|
|
|
}
|
|
|
this.queryProjectAndContract()//获取项目和合同段
|
|
|
+
|
|
|
},
|
|
|
//#region
|
|
|
cancel () {//取消按钮
|
|
@@ -368,6 +408,11 @@ export default {
|
|
|
fromData.projectContractRole = enterpriseUnifiedCode //关联项目
|
|
|
fromData.enterpriseUnifiedCode = this.form.enterpriseUnifiedCode
|
|
|
}
|
|
|
+ console.log(fromData,'fromData');
|
|
|
+ console.log(this.form,'fromData');
|
|
|
+ if(this.form.company=='3'){
|
|
|
+ fromData.certificateType=3
|
|
|
+ }
|
|
|
if (tag) {
|
|
|
if (this.$route.query.id == 0) {
|
|
|
this.save(fromData)//新增接口
|
|
@@ -436,6 +481,7 @@ export default {
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
this.form = res.data
|
|
|
+ this.form.company=res.data.certificateType
|
|
|
if(res.data.certificateFileUrl&&this.form.certificateFileName){
|
|
|
this.form.certificateFileUrl = [{ raw: res.data.certificateFileUrl, name: this.form.certificateFileName }]
|
|
|
}else{
|
|
@@ -552,6 +598,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.getOptions()
|
|
|
this.init()
|
|
|
this.queryRole()//获取角色方
|
|
|
this.findUserByName()//关联用户
|