Browse Source

Merge remote-tracking branch 'origin/master'

ZhangWenQiang 6 years ago
parent
commit
63d19649ae

+ 40 - 19
src/views/company/CompanyAuthenticationList.vue

@@ -54,10 +54,10 @@
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+      <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
+        <!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
+        <!--<a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
+      <!--</div>-->
 
       <a-table
         ref="table"
@@ -74,22 +74,10 @@
         <span slot="action" slot-scope="text, record">
 
                 <a href="javascript:;" @click="handleDetail(record)">详情</a>
+             <a-divider type="vertical" />
+            <a href="javascript:;" @click="confirm1(record)">审核</a>
 
 
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-                <a-menu-item>
-                <a href="javascript:;" @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
         </span>
 
       </a-table>
@@ -104,6 +92,8 @@
 <script>
   import CompanyAuthenticationModal from './modules/CompanyAuthenticationModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { getAction,deleteAction,putAction,postAction} from '@/api/manage'
+  const auditHpUser = (params)=>putAction("/company/companyAuthentication/changeAuth",params);
 
   export default {
     name: "CompanyAuthenticationList",
@@ -160,16 +150,47 @@
           deleteBatch: "/company/companyAuthentication/deleteBatch",
           exportXlsUrl: "company/companyAuthentication/exportXls",
           importExcelUrl: "company/companyAuthentication/importExcel",
+          changeAuthUrl : "company/companyAuthentication/changeAuth"
        },
     }
   },
+
   computed: {
     importExcelUrl: function(){
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
     }
   },
     methods: {
-     
+      //审核确认
+      confirm1(record){
+        let that = this;
+       that.$confirm({
+       title: "审核",
+       content:record.enterpriseName,
+        okText:"通过",
+        cancelText:"不通过",
+       onOk: function () {
+           auditHpUser({ id: record.id,authenticationStatus:3 }).then((res) => {
+           if (res.success) {
+             that.$message.success(res.message)
+             that.loadData();
+           } else {
+             that.$message.warning(res.message)
+           }
+         })
+       },
+        onCancel() {
+          auditHpUser({ id: record.id,authenticationStatus:2 }).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message)
+              that.loadData();
+            } else {
+              that.$message.warning(res.message)
+            }
+          })
+        },
+     })
+     }
     }
   }
 </script>

+ 21 - 11
src/views/company/modules/CompanyAuthenticationModal.vue

@@ -10,7 +10,12 @@
     
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="公司名称">
+          <a-input placeholder="请输入手机号" v-decorator="['enterpriseName', validatorRules.phone ]" />
+        </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
@@ -24,17 +29,14 @@
           label="过期时间">
           <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'expiryDate', validatorRules.expiryDate ]" />
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="营业执照正面">
-          <a-input placeholder="请输入营业执照正面" v-decorator="['licenseFront', validatorRules.licenseFront ]" />
+
+        <a-form-item label="营业执照正面" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <img  :src="getAvatarView()" alt="营业执照正面" style="height:104px;max-width:300px"/>
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="其他资质照片">
-          <a-input placeholder="请输入其他资质照片" v-decorator="['otherLicense', {}]" />
+
+
+        <a-form-item label="其他资质照片" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <img  :src="getAvatarView1()" alt="其他资质照片" style="height:104px;max-width:300px"/>
         </a-form-item>
 
 		
@@ -78,12 +80,20 @@
         url: {
           add: "/company/companyAuthentication/add",
           edit: "/company/companyAuthentication/edit",
+          imgerver: window._CONFIG['domianURL']+"/sys/common/view",
         },
       }
     },
     created () {
     },
     methods: {
+      getAvatarView(){
+        return this.url.imgerver +"/"+ this.model.licenseFront;
+      },
+      getAvatarView1(){
+        return this.url.imgerver +"/"+ this.model.otherLicense;
+      },
+
       add () {
         this.edit({});
       },