| <template> | 
|     <GlobalWindow | 
|         :title="title" | 
|         width="100%" | 
|         :withFooter="false" | 
|         :visible.sync="visible" | 
|         :confirm-working="isWorking" | 
|         @confirm="confirm" | 
|     > | 
|         <el-form ref="form" :model="form" label-width="100px" inline> | 
|             <el-form-item label="企业名称" prop="name"> | 
|                 <el-input v-model="form.model.name" placeholder="请输入" @keypress.enter.native="getList"></el-input> | 
|             </el-form-item> | 
|             <el-form-item> | 
|                 <div style="display: flex; align-items: center;"> | 
|                     <el-button type="primary" @click="getList">搜索</el-button> | 
|                     <el-button @click="reset">重置</el-button> | 
|                 </div> | 
|             </el-form-item> | 
|         </el-form> | 
|         <el-table | 
|             :data="tableData" | 
|             border | 
|             style="width: 100%"> | 
|             <el-table-column | 
|                 prop="name" | 
|                 label="企业名称"> | 
|             </el-table-column> | 
|             <el-table-column | 
|                 width="170" | 
|                 prop="code" | 
|                 label="统一信用代码"> | 
|             </el-table-column> | 
|             <el-table-column | 
|                 prop="createDate" | 
|                 label="创建时间"> | 
|             </el-table-column> | 
|             <el-table-column | 
|                 prop="phone" | 
|                 label="绑定手机"> | 
|             </el-table-column> | 
|             <el-table-column | 
|                 width="90" | 
|                 label="启用状态"> | 
|                 <template slot-scope="{row}"> | 
|                     <span v-if="row.status === 0">启用</span> | 
|                     <span v-if="row.status === 1">禁用</span> | 
|                 </template> | 
|             </el-table-column> | 
|             <el-table-column | 
|                 label="电子签认证状态"> | 
|                 <template slot-scope="{row}"> | 
|                     <template v-if="row.signStatus === 0">待认证</template> | 
|                     <template v-if="row.signStatus === 1">认证中</template> | 
|                     <template v-if="row.signStatus === 2">认证失败</template> | 
|                     <template v-if="row.signStatus === 3">认证通过</template> | 
|                 </template> | 
|             </el-table-column> | 
|             <el-table-column | 
|                 label="操作"> | 
|                 <template slot-scope="{row}"> | 
|                     <el-button type="text" @click="selectItem(row)">选择</el-button> | 
|                 </template> | 
|             </el-table-column> | 
|         </el-table> | 
|         <div style="width: 100%; height: 15px;"></div> | 
|         <el-pagination | 
|             @size-change="handleSizeChange" | 
|             @current-change="handleCurrentChange" | 
|             :current-page="form.page" | 
|             :page-sizes="[10, 30, 50, 100]" | 
|             :page-size="form.size" | 
|             layout="total, sizes, prev, pager, next, jumper" | 
|             :total="total"> | 
|         </el-pagination> | 
|     </GlobalWindow> | 
| </template> | 
|   | 
| <script> | 
|   import BaseOpera from '@/components/base/BaseOpera' | 
|   import GlobalWindow from '@/components/common/GlobalWindow' | 
|   import { fetchList } from '@/api/business/company' | 
|   export default { | 
|     name: 'chooseCompany', | 
|     extends: BaseOpera, | 
|     components: { GlobalWindow }, | 
|     data () { | 
|       return { | 
|         model: {}, | 
|         tableData: [], | 
|         form: { | 
|           page: 1, | 
|           capacity: 10, | 
|           model: { | 
|             type: 0, | 
|             name: '', | 
|             status: 0, | 
|             isdeleted: 1 | 
|           } | 
|         }, | 
|         total: 0 | 
|       } | 
|     }, | 
|     methods: { | 
|       selectItem(row) { | 
|         this.$emit('submit', { companyId: row.id, companyName: row.name }) | 
|         this.visible = false | 
|       }, | 
|       handleSizeChange(e) { | 
|         this.form.capacity = e | 
|         this.getList() | 
|       }, | 
|       handleCurrentChange(e) { | 
|         this.form.page = e | 
|         this.getList() | 
|       }, | 
|       open (title, id) { | 
|         this.title = title | 
|         this.form.name = '' | 
|         this.visible = true | 
|         this.form.page = 1 | 
|         this.form.capacity = 10 | 
|         this.getList() | 
|       }, | 
|       reset() { | 
|         this.form.page = 1 | 
|         this.form.capacity = 10 | 
|         this.form.model.name = '' | 
|         this.getList() | 
|       }, | 
|       getList() { | 
|         fetchList(this.form) | 
|           .then(res => { | 
|             this.total = res.total | 
|             this.tableData = res.records | 
|           }) | 
|       } | 
|     } | 
|   } | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
|   | 
| </style> |