sqg 4 rokov pred
rodič
commit
1c3568f83d

+ 129 - 26
front-vue/src/views/service/rel/companyRel.vue

@@ -45,6 +45,20 @@
                     ></el-option>
             </el-select>
         </el-form-item>
+        <el-form-item label="认证状态" prop="scpStatus">
+            <el-select v-model="queryParams.scpStatus"
+                placeholder="认证状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in scpStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
         <el-form-item label="链属关系" prop="scrType">
             <el-select v-model="queryParams.scrType"
                 placeholder="链属关系"
@@ -94,46 +108,75 @@
       <el-table-column label="社会统一代码" align="center" prop="companyCode" v-if="uncheckList.companyCode" show-overflow-tooltip>
         <template slot-scope="scope">
             <span v-if="scope.row.launch">{{scope.row.receiveScySocialCode}}</span>
-            <span v-else>{{scope.row.launchScySocialCode}}</span>
+            <span v-if="scope.row.receive">{{scope.row.launchScySocialCode}}</span>
+            <span v-if="scope.row.spare">{{scope.row.scpSocialCode}}</span>
         </template>
       </el-table-column>
       <el-table-column label="企业名称" align="center" prop="companyName" v-if="uncheckList.companyName" show-overflow-tooltip>
         <template slot-scope="scope">
             <span v-if="scope.row.launch">{{scope.row.receiveScyName}}</span>
-            <span v-else>{{scope.row.launchScyName}}</span>
+            <span v-if="scope.row.receive">{{scope.row.launchScyName}}</span>
+            <span v-if="scope.row.spare">{{scope.row.scpName}}</span>
         </template>
       </el-table-column>
       <el-table-column label="链属关系" align="center" prop="companyType" v-if="uncheckList.companyType">
         <template slot-scope="scope">
             <span v-if="scope.row.launch">{{companyTypeFormat(scope.row.launchScrReceiveType)}}</span>
-            <span v-else>{{companyTypeFormat(scope.row.launchScrLaunchType)}}</span>
+            <span v-if="scope.row.receive">{{companyTypeFormat(scope.row.launchScrLaunchType)}}</span>
+            <span v-if="scope.row.spare">{{companyTypeFormat(scope.row.scpType)}}</span>
         </template>
       </el-table-column>
-      <el-table-column label="联系人" align="center" prop="launchScrContarct" v-if="uncheckList.launchScrContarct">
+      <el-table-column label="联系人" align="center" prop="scpContarct" v-if="uncheckList.scpContarct">
       </el-table-column>
-      <el-table-column label="联系电话" align="center" prop="launchScrContarctPhone" v-if="uncheckList.launchScrContarctPhone">
+      <el-table-column label="联系电话" align="center" prop="scpContarctPhone" v-if="uncheckList.scpContarctPhone">
       </el-table-column>
-      <el-table-column label="邮箱" align="center" prop="launchScrContarctEmail" v-if="uncheckList.launchScrContarctEmail" show-overflow-tooltip>
+      <el-table-column label="邮箱" align="center" prop="scpContarctEmail" v-if="uncheckList.scpContarctEmail" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="状态" align="center"  prop="launchScrStatus" v-if="uncheckList.launchScrStatus" :formatter="launchScrStatusFormat">
+      <el-table-column label="链属状态" align="center"  prop="launchScrStatus" v-if="uncheckList.launchScrStatus" :formatter="launchScrStatusFormat">
+      </el-table-column>
+      <el-table-column label="认证状态" align="center"  prop="scpStatus" v-if="uncheckList.scpStatus" :formatter="scpStatusFormat">
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
         <template slot-scope="scope">
           <el-button
+            v-if="!scope.row.spare"
             size="mini"
             type="text"
             @click="handleCompanyQuery(scope.row)"
             v-hasPermi="['service:rel:query']"
           >详情</el-button>
           <el-button
-            v-if="scope.row.launch && scope.row.launchScrReceiveType == '01' && scope.row.launchScrStatus =='01'"
-            v-else="scope.row.launchScrLaunchType == '01' && scope.row.launchScrStatus =='01'"
+            v-if="scope.row.launch && scope.row.launchScrStatus == '02'"
+            size="mini"
+            type="text"
+            @click="handleRelInvite(scope.row)"
+            v-hasPermi="['service:rel:update']"
+          >重邀</el-button>
+          <el-button
+            v-if="handleRel && scope.row.launchScrStatus == '01'"
             size="mini"
             type="text"
             @click="handleDelete(scope.row)"
             v-hasPermi="['service:rel:delete']"
           >解绑</el-button>
           <el-button
+            v-if="scope.row.spare && scope.row.scpStatus == '00'"
+            size="mini"
+            type="text"
+            @click="handleSpareDelete(scope.row)"
+            v-hasPermi="['service:spare:removeSpare']"
+          >解绑</el-button>
+          <el-button
+            v-if="
+            scope.row.scpInvite == '1' && scope.row.scpStatus == '00'
+            && scope.row.scpContarct && scope.row.scpContarctPhone
+            "
+            size="mini"
+            type="text"
+            @click="handleInvite(scope.row)"
+            v-hasPermi="['service:spare:invite']"
+          >重邀</el-button>
+          <el-button
             v-if="handleRel && scope.row.launchScrStatus =='00' && scope.row.receive"
             size="mini"
             type="text"
@@ -249,7 +292,7 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
         <template slot-scope="scope">
           <el-button
-            v-if="scope.row.scpInvite == '1'"
+            v-if="scope.row.scpInvite == '1' && scope.row.scpContarct && scope.row.scpContarctPhone"
             size="mini"
             type="text"
             @click="handleInvite(scope.row)"
@@ -259,7 +302,7 @@
             size="mini"
             type="text"
             @click="handleSpareDelete(scope.row)"
-            v-hasPermi="['service:rel:delete']"
+            v-hasPermi="['service:spare:removeSpare']"
           >解绑</el-button>
         </template>
       </el-table-column>
@@ -468,7 +511,8 @@ export default {
         companyName: null,
         scySocialCode: null,
         scrStatus: null,
-        scrType: null
+        scrType: null,
+        scpStatus : null
       },
       //未认证列表查询参数
       spareParams:{
@@ -499,20 +543,24 @@ export default {
               value: '链属关系'
             },
             {
-              label: 'launchScrContarct',
+              label: 'scpContarct',
               value: '联系人'
             },
             {
-              label: 'launchScrContarctPhone',
+              label: 'scpContarctPhone',
               value: '联系电话'
             },
             {
-              label: 'launchScrContarctEmail',
+              label: 'scpContarctEmail',
               value: '邮箱'
             },
             {
               label: 'launchScrStatus',
-              value: '状态'
+              value: '链属状态'
+            },
+            {
+              label: 'scpStatus',
+              value: '认证状态'
             },
             ],
       checkList: [],//筛选列选中的数据列表--显示隐藏列用
@@ -577,7 +625,7 @@ export default {
       },
     };
   },
-  activated() {
+  created() {
     this.getDicts("sys_scr_status").then(response => {
       this.scrStatusOptions = response.data;
     });
@@ -697,9 +745,15 @@ export default {
               if (list[i].launchCompanyId == response.msg) {
                     list[i].receive = false;
                     list[i].launch = true;
+                    list[i].spare = false;
               }else if(list[i].launchReceiveScrCompanyId == response.msg){
                     list[i].launch = false;
                     list[i].receive = true;
+                    list[i].spare = false;
+              }else if(list[i].scpCompanyId == response.msg){
+                    list[i].launch = false;
+                    list[i].receive = false;
+                    list[i].spare = true;
               }
           }
           this.companyRelList = list;
@@ -874,12 +928,14 @@ submitForm() {
           console.log(self.form,"提交表单")
           addRel(self.form).then(response => {
             this.msgSuccess("新增成功");
+            loading.close();
             this.open = false;
             this.getList();
             this.getSpare();
             this.getCompanyList();
+          }).catch((response) => {
+              loading.close();
           });
-          loading.close();
           }
         });
       },
@@ -888,10 +944,10 @@ submitForm() {
       const launchScrId = row.launchScrId || this.ids;
       if (row.launchCompanyId == this.loginId) {
         const scyName = row.receiveScyName;
-      this.$confirm('确认与"' + scyName + '"的链属关系?', "警告", {
+      this.$confirm('确认与"' + scyName + '"的链属关系?',"确认链属",{
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
+          type: "success"
         }).then(function() {
           const state = "01";
           return updateRel(launchScrId,state);
@@ -909,10 +965,10 @@ submitForm() {
         }); 
       }else if(row.launchReceiveScrCompanyId == this.loginId){
         const scyName = row.launchScyName;
-        this.$confirm('确认与"' + scyName + '"的链属关系?', "警告", {
+        this.$confirm('确认与"' + scyName + '"的链属关系?',"确认链属",{
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
+          type: "success"
         }).then(function() {
           const state = "01";
           return updateRel(launchScrId,state);
@@ -931,6 +987,54 @@ submitForm() {
         }); 
       }
     },
+    //重邀拒绝链属
+    handleRelInvite(row){
+      const launchScrId = row.launchScrId || this.ids;
+      if (row.launchCompanyId == this.loginId) {
+        const scyName = row.receiveScyName;
+      this.$confirm('邀请与"' + scyName + '"的链属关系?',"邀请",{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info"
+        }).then(function() {
+          const state = "00";
+          return updateRel(launchScrId,state);
+        }).then(() => {
+          this.msgSuccess("邀请成功");
+          this.getList();
+          this.getSpare();
+          this.getCompanyList();
+        })
+        .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消邀请",
+          });
+        }); 
+      }else if(row.launchReceiveScrCompanyId == this.loginId){
+        const scyName = row.launchScyName;
+        this.$confirm('邀请与"' + scyName + '"的链属关系?',"邀请",{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info"
+        }).then(function() {
+          const state = "01";
+          return updateRel(launchScrId,state);
+        }).then(() => {
+          this.msgSuccess("邀请成功");
+          this.getList();
+          this.getSpare();
+          this.getCompanyList();
+        })
+        .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消邀请",
+           
+          });
+        }); 
+      }
+    },
     /* 拒绝链属 */
     handleRefuse(row){
       const launchScrId = row.launchScrId || this.ids;
@@ -1038,8 +1142,10 @@ submitForm() {
         }).then(function() {
           return removeSpare(scpId);
         }).then(() => {
-          this.getSpare();
           this.msgSuccess("解绑成功");
+          this.getList();
+          this.getSpare();
+          this.getCompanyList();
         })
         .catch(() => {
           this.$message({
@@ -1059,9 +1165,6 @@ submitForm() {
             background: "rgba(0, 0, 0, 0.7)",
           })
       againInvite(row).then(response => {
-          this.getList();
-          this.getSpare();
-          this.getCompanyList();
         }).then(() => {
           this.msgSuccess("重邀成功");
           this.getList();

+ 77 - 24
front-vue/src/views/service/rel/companyRelManage.vue

@@ -11,20 +11,20 @@
          </div>
          <hr  style="margin-top: 16px;">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
-      <el-form-item label="企业名称" prop="companyName">
+      <el-form-item label="企业名称" prop="scpName">
         <el-input
           maxlength="30"
-          v-model="queryParams.companyName"
+          v-model="queryParams.scpName"
           placeholder="请输入企业名称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="联系人" prop="scrContarct" >
+      <el-form-item label="联系人" prop="scpContarct" >
         <el-input
           maxlength="30"
-          v-model="queryParams.scrContarct"
+          v-model="queryParams.scpContarct"
           placeholder="请输入联系人"
           clearable
           size="small"
@@ -45,6 +45,20 @@
                     ></el-option>
             </el-select>
         </el-form-item>
+      <el-form-item label="认证状态" prop="scpStatus">
+            <el-select v-model="queryParams.scpStatus"
+                placeholder="认证状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in scpStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
     </el-form>
     </el-card>
 
@@ -68,22 +82,41 @@
         </template>
       </el-table-column>
       <el-table-column label="发起方" align="center" prop="launchScyName" v-if="uncheckList.launchScyName" show-overflow-tooltip>
+        <template slot-scope="scope">
+            <span v-if="scope.row.rel">{{scope.row.launchScyName}}</span>
+            <span v-if="scope.row.spare">{{scope.row.spareScyName}}</span>
+        </template>
       </el-table-column>
       <el-table-column label="链属关系(发起方)" align="center" prop="launchScrLaunchType" 
-          v-if="uncheckList.launchScrLaunchType" :formatter="launchScrLaunchTypeFormat" show-overflow-tooltip>
+          v-if="uncheckList.launchScrLaunchType" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span v-if="scope.row.rel">{{launchScrLaunchTypeFormat(scope.row.launchScrLaunchType)}}</span>
+            <span v-if="scope.row.spare && scope.row.scpType == '01'">{{launchScrLaunchTypeFormat("00")}}</span>
+            <span v-if="scope.row.spare && scope.row.scpType == '00'">{{launchScrLaunchTypeFormat("01")}}</span>
+          </template>
       </el-table-column>
       <el-table-column label="接收方" align="center" prop="receiveScyName" v-if="uncheckList.receiveScyName" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span v-if="scope.row.rel">{{scope.row.receiveScyName}}</span>
+            <span v-if="scope.row.spare">{{scope.row.scpName}}</span>
+          </template>
       </el-table-column>
       <el-table-column label="链属关系(接收方)" align="center" prop="launchScrReceiveType" 
-          v-if="uncheckList.launchScrReceiveType" :formatter="launchScrReceiveTypeFormat" show-overflow-tooltip>
+          v-if="uncheckList.launchScrReceiveType" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span v-if="scope.row.rel">{{launchScrReceiveTypeFormat(scope.row.launchScrReceiveType)}}</span>
+            <span v-if="scope.row.spare">{{launchScrReceiveTypeFormat(scope.row.scpType)}}</span>
+          </template>
       </el-table-column>
-      <el-table-column label="联系人" align="center" prop="launchScrContarct" v-if="uncheckList.launchScrContarct">
+      <el-table-column label="联系人" align="center" prop="scpContarct" v-if="uncheckList.scpContarct">
       </el-table-column>
-      <el-table-column label="联系电话" align="center" prop="launchScrContarctPhone" v-if="uncheckList.launchScrContarctPhone">
+      <el-table-column label="联系电话" align="center" prop="scpContarctPhone" v-if="uncheckList.scpContarctPhone">
       </el-table-column>
-      <el-table-column label="邮箱" align="center" prop="launchScrContarctEmail" v-if="uncheckList.launchScrContarctEmail" show-overflow-tooltip>
+      <el-table-column label="邮箱" align="center" prop="scpContarctEmail" v-if="uncheckList.scpContarctEmail" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="状态" align="center"  prop="launchScrStatus" v-if="uncheckList.launchScrStatus" :formatter="launchScrStatusFormat">
+      <el-table-column label="链属状态" align="center"  prop="launchScrStatus" v-if="uncheckList.launchScrStatus" :formatter="launchScrStatusFormat">
+      </el-table-column>
+      <el-table-column label="认证状态(接收方)" align="center"  prop="scpStatus" v-if="uncheckList.scpStatus" :formatter="scpStatusFormat">
       </el-table-column>
     </el-table>
     
@@ -165,6 +198,12 @@
         </template>
       </el-table-column>
       <el-table-column label="发起方" align="center"  prop="scyName" show-overflow-tooltip/>
+      <el-table-column label="链属关系(发起方)" align="center" width="113px" prop="lanchScpType">
+          <template slot-scope="scope">
+            <span v-if="scope.row.scpType == '00'">{{lanchScpTypeFormat("01")}}</span>
+            <span v-if="scope.row.scpType == '01'">{{lanchScpTypeFormat("00")}}</span>
+          </template>
+      </el-table-column>
       <el-table-column label="接收方" align="center"  prop="scpName" show-overflow-tooltip/>
       <el-table-column label="社会统一代码(接收方)" align="center" width="150px" prop="scpSocialCode" show-overflow-tooltip/>
       <el-table-column label="链属关系(接收方)" align="center" width="113px" prop="scpType" :formatter="scpTypeFormat" />
@@ -337,10 +376,10 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        companyName: null,
-        scySocialCode: null,
+        scpName: null,
         scrStatus: null,
-        scrContarct : null
+        scpContarct : null,
+        scpStatus : null
       },
       //未认证列表查询参数
       spareParams:{
@@ -375,20 +414,24 @@ export default {
               value: '链属关系(接收方)'
             },
             {
-              label: 'launchScrContarct',
+              label: 'scpContarct',
               value: '联系人'
             },
             {
-              label: 'launchScrContarctPhone',
+              label: 'scpContarctPhone',
               value: '联系电话'
             },
             {
-              label: 'launchScrContarctEmail',
+              label: 'scpContarctEmail',
               value: '邮箱'
             },
             {
               label: 'launchScrStatus',
-              value: '状态'
+              value: '链属状态'
+            },
+            {
+              label: 'scpStatus',
+              value: '认证状态'
             },
             ],
       checkList: [],//筛选列选中的数据列表--显示隐藏列用
@@ -422,7 +465,7 @@ export default {
       },
     };
   },
-  activated() {
+  created() {
     this.getDicts("sys_scr_status").then(response => {
       this.scrStatusOptions = response.data;
     });
@@ -465,15 +508,18 @@ export default {
     },
 
     // 菜单状态字典翻译
-    launchScrLaunchTypeFormat(row, column) {
-      return this.selectDictLabel(this.scrTypeOptions, row.launchScrLaunchType);
+    launchScrLaunchTypeFormat(launchScrLaunchType) {
+      return this.selectDictLabel(this.scrTypeOptions, launchScrLaunchType);
     },
-    launchScrReceiveTypeFormat(row, column) {
-      return this.selectDictLabel(this.scrTypeOptions, row.launchScrReceiveType);
+    launchScrReceiveTypeFormat(launchScrReceiveType) {
+      return this.selectDictLabel(this.scrTypeOptions, launchScrReceiveType);
     },
     scpTypeFormat(row, column) {
       return this.selectDictLabel(this.scrTypeOptions, row.scpType);
     },
+    lanchScpTypeFormat(lanchScpType) {
+      return this.selectDictLabel(this.scrTypeOptions, lanchScpType);
+    },
     scpStatusFormat(row, column) {
       return this.selectDictLabel(this.scpStatusOptions, row.scpStatus);
     },
@@ -562,9 +608,16 @@ export default {
       this.loading = true;
        listRel(this.queryParams).then(response => {
           let list = response.data.records;
+          for (let i = 0; i < list.length; i++) {
+              if (list[i].scpRelId != '' && list[i].scpRelId != null) {
+                    list[i].rel = true;
+                    list[i].spare = false;
+              }else if(list[i].scpRelId == '' || list[i].scpRelId == null){
+                    list[i].rel = false;
+                    list[i].spare = true;
+              }
+          }
           this.companyRelList = list;
-          console.log(12312313123)
-          console.log(this.companyRelList)
           this.total = response.data.total;
           this.loading = false;
         }