duy 1 vuosi sitten
vanhempi
commit
b9d7678202

+ 61 - 9
src/views/exctab/ElementIdentification/template/electronicSignature.vue

@@ -21,7 +21,7 @@
         </el-col>
       </el-row>
 
-      <el-row :span="24" v-if="signType==1">
+      <el-row :span="24" v-if="signType==2">
         <el-col :span="3.3">
           所属方:
         </el-col>
@@ -30,7 +30,7 @@
         </el-col>
       </el-row>
 
-      <el-row :span="24" v-if="signType==1">
+      <el-row :span="24" v-if="signType==2">
         <el-col :span="3.3" style="line-height: 40px">
           签字角色:
         </el-col>
@@ -41,7 +41,7 @@
         </el-col>
       </el-row>
 
-      <el-row :span="24" v-if="signType==2">
+      <el-row :span="24" v-if="signType==6">
         <el-col :span="3.3" style="line-height: 40px">
           签章类型:
         </el-col>
@@ -79,6 +79,10 @@
                    size="small"
                    icon="el-icon-circle-plus-outline"
                    @click="addRoleInfo()">添加列表</el-button> &nbsp;&nbsp;
+          <el-button type="primary"
+          size="small"
+          icon="el-icon-circle-edit-outline"
+          @click="editRoleInfo()">编辑电签</el-button> &nbsp;&nbsp;
       </el-row>
 
 
@@ -114,6 +118,7 @@
           <td>{{item.pyzbx}}</td>
           <td>{{item.pyzby}}</td>
           <td align="center"><span style="color:red;cursor: pointer;" v-on:click="deleteTableSig(key)">删除</span></td>
+          <td align="center"><span style="color:red;cursor: pointer;" >编辑</span></td>
         </tr>
         </tbody>
       </table>
@@ -132,7 +137,7 @@
 
 <script>
 
-import {getRoleInfoByParentId, getRoleType, getSigList, saveSig} from "@/api/manager/AdjustForm";
+import {getRoleInfoByParentId, getRoleType, getSigList, saveSig,updateDetail} from "@/api/manager/AdjustForm";
 import {findPfxType} from "@/api/certificate/list";
 
 
@@ -146,21 +151,45 @@ export default {
       roleInfo: '',
       signInfo: '',
       signInfoarr:[],
-      signType: '1', // 证书类型
+      signType: '2', // 证书类型
       pyzbx: 0.0,
       pyzby: 0.0 ,
       setsignaTable:[],
       seloptions : [
         {
-          value: '1',
+          value: '2',
           label: '个人证书',
         },
         {
-          value: '2',
+          value: '6',
           label: '企业证书',
         }
       ],
       isCansave:false,
+      colKey:'',
+      colName:'',
+    }
+  },
+   watch: {
+    'htmlData1': {
+      handler(val) {
+       setTimeout(() => {
+           if(val.obj){
+          let obj=val.obj
+          console.log(obj,'obj');
+          this.signType=obj.type.toString()
+          this.pyzbx=obj.pyzbx
+          this.pyzby=obj.pyzby
+          this.sigRoleId=obj.sigRoleId
+          this.colKey=obj.colKey
+          this.colName=obj.colName
+        }
+       }, 1000);
+   
+        
+        // todo
+      },
+      deep: true
     }
   },
   methods: {
@@ -215,7 +244,7 @@ export default {
       }
       // 签字岗位
 
-      if (this.signType==1){
+      if (this.signType==2){
         if(this.roleInfo ==='') {
           this.$message({
             type: "error",
@@ -226,7 +255,7 @@ export default {
         data.sigRoleId = this.roleInfo.value;
         data.sigRoleName = this.roleInfo.label;
         data.type=2;
-      }else if(this.signType==2){
+      }else if(this.signType==6){
         if(this.signInfo ===''){
           this.$message({
             type: "error",
@@ -276,6 +305,29 @@ export default {
         throw e;
       }
     },
+    async editRoleInfo(){
+      console.log('编辑电签');
+      console.log(this.htmlData1,'this.htmlData.dqid1111111');
+      let obj={}
+      obj.colKey=this.colKey
+      obj.colName=this.colName
+      obj.sigRoleId=this.sigRoleId
+      obj.tabId=this.pkeyId1
+      obj.excelId=this.excelId
+      obj.type=this.signType
+      obj.pyzbx=this.pyzbx
+      obj.pyzby=this.pyzby
+      const {data: res} = await updateDetail({dataInfo: [obj],tabId:this.pkeyId1})
+      console.log(res);
+      if(res.code==200){
+        this.$message({
+                type: "success",
+                message: "操作成功"
+          });
+      }
+       
+      
+    },
    async deleteTableSig (key) {//删除数据
         this.setsignaTable.splice(key,1);
         this.isCansave=true

+ 14 - 1
src/views/manager/projectinfo/treeTemplate/dynamicExcel.vue

@@ -49,6 +49,7 @@ import editDefault from './template/editDefault.vue'
 import promptSettings from './template/promptSettings.vue'
 import Vue from 'vue'
 import {getExcelHtml } from '@/api/exctab/excelmodel'
+import {getSignDetail} from "@/api/manager/AdjustForm";
 export default {
   props: ['pkeyId','excelId'],
   data () {
@@ -221,7 +222,7 @@ export default {
     },
 
     //excel父节点点击检测
-    parentClick(e){
+   async parentClick(e){
       let target = e.target;
       const{metaKey,ctrlKey}=e
       console.log(target,'target')
@@ -233,6 +234,17 @@ export default {
       //console.log(target.getAttribute('trindex'))
       let tdEle = this.getParentTD(target);
       console.log(tdEle,'tdEle');
+      console.log(tdEle.getAttribute('dqid'),'dianqianid');
+      this.htmlData.dqid=tdEle.getAttribute('dqid')
+      // const {data: res} = await getSignDetail({id: this.htmlData.dqid})
+      //   console.log(res,'res');
+      if( this.htmlData.dqid){
+              const {data: res} = await getSignDetail({id: this.htmlData.dqid})
+             if(res.code===200){
+              console.log(res,'res');
+              this.htmlData.obj=res.data
+             }
+      }
       let target1
         if(tdEle){
           let mydiv=tdEle.getElementsByTagName('div')
@@ -243,6 +255,7 @@ export default {
           target=mydiv[0]
 
         }
+     
         this.htmlData.keyname=target.getAttribute('keyname')||target1.getAttribute('keyname')
       if(target.getAttribute('trindex') !== null && target.getAttribute('tdindex')||target1.getAttribute('trindex') !== null && target1.getAttribute('tdindex')){
         let tdEle = this.getParentTD(target);

+ 86 - 10
src/views/manager/projectinfo/treeTemplate/template/electronicSignature.vue

@@ -21,7 +21,7 @@
         </el-col>
       </el-row>
 
-      <el-row :span="24" v-if="signType==1">
+      <el-row :span="24" v-if="signType==2">
         <el-col :span="3.3">
           所属方:
         </el-col>
@@ -30,7 +30,7 @@
         </el-col>
       </el-row>
 
-      <el-row :span="24" v-if="signType==1">
+      <el-row :span="24" v-if="signType==2">
         <el-col :span="3.3" style="line-height: 40px">
           签字角色:
         </el-col>
@@ -41,7 +41,7 @@
         </el-col>
       </el-row>
 
-      <el-row :span="24" v-if="signType==2">
+      <el-row :span="24" v-if="signType==6">
         <el-col :span="3.3" style="line-height: 40px">
           签章类型:
         </el-col>
@@ -79,6 +79,10 @@
                    size="small"
                    icon="el-icon-circle-plus-outline"
                    @click="addRoleInfo()">添加列表</el-button> &nbsp;&nbsp;
+        <el-button type="primary"
+        size="small"
+        icon="el-icon-circle-edit-outline"
+        @click="editRoleInfo()" v-loaing="isEditLoaing">编辑电签</el-button> &nbsp;&nbsp;
       </el-row>
 
 
@@ -132,7 +136,7 @@
 
 <script>
 
-import {getRoleInfoByParentId, getRoleType, getSigList, saveSig,remove} from "../../../../../api/manager/AdjustForm";
+import {getRoleInfoByParentId, getRoleType, getSigList, saveSig,remove,updateDetail} from "../../../../../api/manager/AdjustForm";
 import {findPfxType} from "../../../../../api/certificate/list";
 
 
@@ -146,21 +150,58 @@ export default {
       roleInfo: '',
       signInfo: '',
       signInfoarr:[],
-      signType: '1', // 证书类型
+      signType: '2', // 证书类型
       pyzbx: 0.0,
       pyzby: 0.0 ,
       setsignaTable:[],
       seloptions : [
         {
-          value: '1',
+          value: '2',
           label: '个人证书',
         },
         {
-          value: '2',
+          value: '6',
           label: '企业证书',
         }
       ],
       isCansave:false,
+      colKey:'',
+      colName:'',
+      signId:'',
+      isDeleted:'',
+      parentRoleId:'',
+      isEditLoaing:false
+   
+    }
+  },
+  watch: {
+    'htmlData1': {
+      handler(val) {
+        this.roleTypeChang()
+       setTimeout(async() => {
+           if(val.obj){
+          let obj=val.obj
+          console.log(obj,'obj');
+          this.signType=obj.type.toString()
+          this.pyzbx=obj.pyzbx
+          this.pyzby=obj.pyzby
+          this.sigRoleId=obj.sigRoleId
+          this.colKey=obj.colKey
+          this.colName=obj.colName
+          this.signId=obj.id
+          this.isDeleted=obj.isDeleted
+          if(obj.type==2){
+            this.radio=obj.parentRoleId
+            this.roleInfo=obj.sigRoleId
+           
+          }
+        }
+       }, 1000);
+   
+        
+        // todo
+      },
+      deep: true
     }
   },
   methods: {
@@ -174,7 +215,7 @@ export default {
     // 签证类型
     async signTypeChang(){
       setTimeout(async () => {
-        if(this.signType==2){
+        if(this.signType==6){
           const {data: res} = await findPfxType({ typeOrStatus: 'pfx_type'})
           if (res.code === 200) {
             this.options = res.data
@@ -215,7 +256,7 @@ export default {
       }
       // 签字岗位
 
-      if (this.signType==1){
+      if (this.signType==2){
         if(this.roleInfo ==='') {
           this.$message({
             type: "error",
@@ -226,7 +267,7 @@ export default {
         data.sigRoleId = this.roleInfo.value;
         data.sigRoleName = this.roleInfo.label;
         data.type=2;
-      }else if(this.signType==2){
+      }else if(this.signType==6){
         if(this.signInfo ===''){
           this.$message({
             type: "error",
@@ -275,6 +316,37 @@ export default {
       }catch (e){
         throw e;
       }
+    },
+   async editRoleInfo(){
+      console.log('编辑电签');
+      this.isEditLoaing=true
+      console.log(this.htmlData1,'this.htmlData.dqid1111111');
+      let obj={}
+      obj.colKey=this.colKey
+      obj.colName=this.colName
+      obj.sigRoleId=this.sigRoleId
+      obj.tabId=this.pkeyId1
+      obj.excelId=this.excelId
+      obj.type=this.signType
+      obj.pyzbx=this.pyzbx
+      obj.pyzby=this.pyzby
+      obj.id=this.signId
+      obj.isDeleted=this.isDeleted
+      if(this.signType==2){
+        obj.parentRoleId=this.radio
+      }
+    
+      const {data: res} = await updateDetail(obj)
+      this.isEditLoaing=false
+      console.log(res);
+      if(res.code==200){
+        this.$message({
+                type: "success",
+                message: "操作成功"
+          });
+      }
+       
+      
     },
    async deleteTableSig (key,id,item) {//删除数据
    console.log(item,'item');
@@ -288,6 +360,7 @@ export default {
               //console.log(this.$parent)
               this.isCansave=false
               this.$parent.getExcelHtml(this.pkeyId1);
+              this.getSingInfo()
               this.$message({
                 type: "success",
                 message: "操作成功"
@@ -328,8 +401,11 @@ export default {
     this.getRoleType();  //获取文本类型接口
     this.getSingInfo();
     this.setsignaTable=[];
+    console.log(this.htmlData1,'html1');
 
   },
+
+
 }