Browse Source

Merge branch 'need_pool291'

shanbinzhang 2 days ago
parent
commit
dfe75927d1

+ 5 - 0
src/api/modules/sealApi.js

@@ -70,6 +70,11 @@ const sealInterence={
 	//上传/更新签回附件
 	sealCheckFileUpload:params=>{
 		return http.post('/seal/uploadCheckBackFile',params)
+	},
+
+	//获取归属公司
+	getBelongCompany: params => {
+		return http.get('/seal/getAffiliatedCompany')
 	}
 }
 

+ 60 - 13
src/views/seal_manage/approvalList.vue

@@ -2,6 +2,14 @@
 <div class="seal-approval-wrap">
   <div class="content">
       <div class="select-wrap" style="margin-bottom:30px">
+        <el-select v-model="belongCompany" placeholder="请选择归属公司" @change="handleSelectChange" clearable style="margin-right:20px">
+          <el-option
+            v-for="item in belongCompanyOption"
+            :key="item"
+            :label="item"
+            :value="item">
+          </el-option>
+        </el-select>
         <el-select v-model="contractTypeVal" placeholder="合同类型" @change="handleSelectChange" clearable style="margin-right:20px">
           <el-option
             v-for="item in contractTypeList"
@@ -49,15 +57,25 @@
           clearable
           @input="handleSearch">
         </el-input>
-        <el-button 
-          type="primary" 
-          style="float:right" 
-          @click="$router.push('/addSeal')" 
-          v-if="['ficc_seller','rai_seller','compliance'].includes(RoleType)"
-        >添加用印</el-button>
+
+        <div style="float:right" >
+          <el-button 
+            type="primary" 
+            @click="$router.push('/addSeal')" 
+            v-if="['ficc_seller','rai_seller','compliance'].includes(RoleType)"
+          >添加用印</el-button>
+          <a :href="exportUrl" download v-if="['admin','ficc_admin','compliance'].includes(RoleType)">
+            <el-button type="primary">导出</el-button>
+          </a>
+        </div>
       </div>
       <div class="list-wrap">
         <el-table :data="tableList" border>
+          <el-table-column align="center"  prop="CompanyName" label="归属公司">
+            <template slot-scope="scope"> 
+              <span>{{scope.row.AffiliatedCompany}}</span>
+            </template>
+          </el-table-column>
           <el-table-column align="center"  prop="CompanyName" label="客户名称">
             <template slot-scope="scope"> 
               <span>{{scope.row.CompanyName}}</span>
@@ -118,6 +136,7 @@
             <table class="table-wrap" >
               <tbody>
                 <tr>
+                  <td class="table-item width-50">所属公司:{{detail.SealDetail.AffiliatedCompany}}</td>
                   <td class="table-item width-50">
                     <p v-if="detail.OpButton.CheckEdit">
                       <span>用印用途:</span>
@@ -133,14 +152,16 @@
                     </p>
                     <p v-else>用印用途:{{detail.SealDetail.Use}}</p>
                   </td>
-                  <td class="table-item width-50">所属销售:{{detail.SealDetail.UserName}}</td>
                 </tr>
                 <tr>
+                  <td class="table-item width-50">所属销售:{{detail.SealDetail.UserName}}</td>
                   <td class="table-item width-50">客户名称:{{detail.SealDetail.CompanyName}}</td>
+                </tr>
+                <tr>
                   <td class="table-item width-50">社会信用码:{{detail.SealDetail.CreditCode}}</td>
+                  <td class="table-item width-50">合同类型:{{detail.SealDetail.ServiceType}}</td>  
                 </tr>
                 <tr>
-                  <td class="table-item width-50">合同类型:{{detail.SealDetail.ServiceType}}</td>
                   <td class="table-item width-50">
                     <p v-if="detail.OpButton.CheckEdit">
                       <span>文件份数:</span>
@@ -149,8 +170,6 @@
                     </p>
                     <p v-else>文件份数:{{detail.SealDetail.FileNum}}</p>
                   </td>
-                </tr>
-                <tr>
                   <td class="table-item">
                     <p v-if="detail.OpButton.CheckEdit">
                       <span>加盖印章:</span>
@@ -158,12 +177,15 @@
                         <el-option label="合同章" value="合同章"></el-option>
                         <el-option label="公章" value="公章"></el-option>
                         <el-option label="法人章" value="法人章"></el-option>
+                        <el-option label="电子合同章" value="电子合同章"></el-option>
                       </el-select>
                     </p>
                     <p v-else>加盖印章:{{detail.SealDetail.SealType}}</p>
                   </td>
-                  <td class="table-item">实际使用方:{{detail.SealDetail.UseCompanyName||detail.SealDetail.CompanyName}}</td>
                 </tr>
+                <tr>
+                  <td class="table-item" colspan="2">实际使用方:{{detail.SealDetail.UseCompanyName||detail.SealDetail.CompanyName}}</td>
+                </tr>  
                 <tr>
                   <td class="table-item" colspan="2" style="text-align: left">
                     <p v-if="detail.OpButton.CheckEdit" style="display:flex">
@@ -315,6 +337,21 @@ export default {
       
     }
   },
+  computed: {
+    exportUrl() {
+      let auth = localStorage.getItem("auth") || "";
+      let salesArr=[]
+			if(this.seller.length){
+				salesArr=this.seller.map(item=>{
+					return item[item.length-1]
+				})
+			}
+
+      return `${process.env.API_ROOT}/seal/getApprovalPageList?IsExport=true&${auth}&PageSize=${this.pageSize}&CurrentIndex=${this.page}&ContractType=${this.contractTypeVal}&Status=${this.sealStatusVal}&SellerId=${salesArr.join(',')}&StartTime=${this.time&&this.time[0]||''}&EndTime=${this.time&&this.time[1]||''}&Keyword=${this.searchVal}&AffiliatedCompany=${this.belongCompany}`
+        
+      
+    }
+  },
   data () {
     return {
       RoleType:localStorage.getItem('Role')||'',
@@ -369,11 +406,15 @@ export default {
       },//上传/更新附件文件数据
       showAttachment:false,// 是否显示预览附件弹窗
       attachmentUrls:[],// 附件列表
+
+      belongCompany: '',//归属公司
+      belongCompanyOption: []
     }
   },
   created () {
     this.getSellerList();
     this.getSealApprovalList()
+    this.getBelongCompanyOptions()
     if(['ficc_seller','rai_seller'].includes(this.RoleType)){
       this.sealStatusList=['待审批','已撤回','处理中','已审批','已驳回','已签回','已作废']
     }else{
@@ -381,6 +422,12 @@ export default {
     }
   },
   methods: {
+    async getBelongCompanyOptions() {
+      const res = await sealInterence.getBelongCompany()
+      if(res.Ret !==200 ) return
+      this.belongCompanyOption = res.Data || []
+    },
+
     //获取所属销售列表
     getSellerList() {
       contractInterface.getSellerList().then((res) => {
@@ -405,7 +452,8 @@ export default {
         SellerId:salesArr.join(','),
         StartTime:this.time&&this.time[0]||'',
         EndTime:this.time&&this.time[1]||'',
-        Keyword:this.searchVal
+        Keyword:this.searchVal,
+        AffiliatedCompany: this.belongCompany
       })
       if(res.Ret===200){
         this.tableList=res.Data.List
@@ -883,7 +931,6 @@ export default {
       font-weight: bold;
       color: #333;
       float: left;
-      margin-top: 4px;
     }
     .user-box{
       padding-left: 100px;

+ 28 - 0
src/views/seal_manage/updateSeal.vue

@@ -8,6 +8,19 @@
     >
       <div class="one-part">
         <div class="box">
+          <el-form-item label="归属公司:" prop="AffiliatedCompany">
+            <el-select v-model.trim="sealForm.AffiliatedCompany" clearable>
+              <el-option
+                v-for="item in belongCompanyOption"
+                :key="item"
+                :label="item"
+                :value="item"
+              ></el-option>
+            </el-select>
+            <el-tooltip class="item" effect="dark" content="归属公司:申请用章公司" placement="top">
+              <i class="el-icon-warning"></i>
+            </el-tooltip>
+          </el-form-item>
           <el-form-item label="用印用途:" prop="Use">
             <el-select v-model.trim="sealForm.Use" clearable>
               <el-option
@@ -176,9 +189,11 @@ export default {
         Remark: "", //审批备注
         fileList: [], //合同附件
         ContractId: 0, //合同id(默认为0)
+        AffiliatedCompany:''
       },
       sealRules: {
         //表单校验规则
+        AffiliatedCompany: [{ required: true, message: "请选择归属公司", trigger: "blur" }],
         Use: [{ required: true, message: "请选择用印用途", trigger: "blur" }],
         CompanyName: [
           { required: true, message: "请选择客户名称", trigger: "blur" },
@@ -221,8 +236,11 @@ export default {
         { label: "合同章", value: 1 },
         { label: "公章", value: 2 },
         { label: "法人章", value: 3 },
+        { label: "电子合同章", value: 4 },
       ],
       isWatch: true, // 控制watch是否触发
+
+      belongCompanyOption:[]
     };
   },
   created() {
@@ -230,6 +248,7 @@ export default {
     if (this.sealId) {
       this.getsealApprovalDetail();
     }
+    this.getBelongCompanyOptions()
   },
   computed: {
     // 用印id,有则表示编辑,无表示新增
@@ -245,6 +264,12 @@ export default {
     },
   },
   methods: {
+    async getBelongCompanyOptions() {
+      const res = await sealInterence.getBelongCompany()
+      if(res.Ret !==200 ) return
+      this.belongCompanyOption = res.Data || []
+    },
+
     // 获取用印详情
     async getsealApprovalDetail() {
       try {
@@ -269,6 +294,7 @@ export default {
           this.sealForm.SealType = SealDetail.SealType.split(",");
           this.sealForm.ServiceType = SealDetail.ServiceType;
           this.sealForm.UseCompanyName = SealDetail.UseCompanyName;
+          this.sealForm.AffiliatedCompany = SealDetail.AffiliatedCompany;
           this.sealForm.source =
             SealDetail.ContractId > 0 ? "系统合同" : "上传附件";
           // 打开监听
@@ -385,6 +411,7 @@ export default {
           ServiceType: this.sealForm.ServiceType,
           Use: this.sealForm.Use,
           UseCompanyName: this.sealForm.UseCompanyName,
+          AffiliatedCompany: this.sealForm.AffiliatedCompany,
         };
         let res = {};
         if (this.sealId) {
@@ -439,6 +466,7 @@ export default {
         Remark: "", //审批备注
         fileList: [], //合同附件
         ContractId: 0, //合同id(默认为0)
+        AffiliatedCompany:''
       };
       // 清除校验提示
       this.$nextTick(() => {

+ 1 - 1
src/views/system_manage/approvalManage.vue

@@ -99,7 +99,7 @@ import {departInterence} from '@/api/api.js'
 const config={
   '客户审批':[{id:1,name:'FICC部门'},{id:2,name:'权益部门'}],
   '合同审批':[{id:3,name:'FICC部门'},{id:4,name:'权益部门'}],
-  '用印审批':[{id:5,name:'合同章'},{id:6,name:'公章/法人章'}]
+  '用印审批':[{id:5,name:'合同章/电子合同章'},{id:6,name:'公章/法人章'}]
 }
 export default {
   data () {